Opened 4 years ago
Closed 4 years ago
#8605 closed defect (bug) (fixed)
POST-request, but content-length missing -> 411
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.7.1 |
| Component: | General | Version: | 2.7 |
| Severity: | normal | Keywords: | |
| Cc: | eliascn |
Description
Since I updated to 2.7 stable, I found lighttpd 1.4.13-4etch11 (PHP5.2.0-8+etch13 + FastCGI) record the following error into error.log for every access on wordpress homepage (the page could be displayed as usual, lighttpd just record such error):
2008-12-14 01:41:29: (request.c.1092) POST-request, but content-length missing -> 411
But for 2.6.5, everything is ok.
After checking the time stamp in error.log, I found that is an access to wp-cron.php at the same time.
58.30.17.160 - - [14/Dec/2008:01:41:29 +0800] "POST /wp-cron.php?check=f799fc914a05b24049b91d71848f26ed HTTP/1.0" 411 357 "-" "WordPress/2.7"
In which, "58.30.17.160" is the ip of my server itself.
Attachments (1)
Change History (11)
It appears the problem is related to Lighttpd being strict about receiving a Content-Length: http://forum.lighttpd.net/topic/482
I haven't tested it conclusively, but I've found adding:
$r['headers']['Content-Length'] = 0;
to line 245 (above the $transports line), which is explicitly defining Content-Length as 0 for a null body, seems to fix my scheduled posts problem and has made the errors go away.
I've attached a quick diff file too.
- Resolution set to worksforme
- Status changed from new to closed
I tested the patch on my site, and it worked. Thanks all the effort!
comment:10
DD32 — 4 years ago
- Resolution set to fixed
- Status changed from reopened to closed

Having exactly the same problem. wp-cron.php controls scheduled posts, and as a result of this problem my scheduled posts aren't working at all. They were working fine before upgrading to 2.7 stable from 2.6.