Ticket #8605 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 3 years ago

POST-request, but content-length missing -> 411

Reported by: eliascn Owned by: anonymous
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

lighttpd-patch Download (71 bytes) - added by Jalada 3 years ago.

Change History

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.

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.

Jalada3 years ago

Sorry, that is line 245 of wp-includes/http.php. My bad.

  • Milestone set to 2.8

Open Tickets must have milestone.

comment:5   ryan3 years ago

  • Milestone changed from 2.8 to 2.7.1

comment:6   ryan3 years ago

(In [10211]) Set Content-Length to 0 for null body requests. Props Jalada. see #8605

comment:7   ryan3 years ago

(In [10212]) Set Content-Length to 0 for null body requests. Props Jalada. see #8605 for 2.7

  • Status changed from new to closed
  • Resolution set to worksforme

I tested the patch on my site, and it worked. Thanks all the effort!

comment:9   DD323 years ago

  • Status changed from closed to reopened
  • Resolution worksforme deleted
  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.