Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#8605 closed defect (bug) (fixed)

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

Reported by: eliascn's profile eliascn Owned by:
Milestone: 2.7.1 Priority: normal
Severity: normal Version: 2.7
Component: General Keywords:
Focuses: Cc:

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)

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

Download all attachments as: .zip

Change History (11)

#1 @Jalada
16 years ago

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.

#2 @Jalada
16 years ago

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.

@Jalada
16 years ago

#3 @Jalada
16 years ago

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

#4 @jacobsantos
16 years ago

  • Milestone set to 2.8

Open Tickets must have milestone.

#5 @ryan
16 years ago

  • Milestone changed from 2.8 to 2.7.1

#6 @ryan
16 years ago

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

#7 @ryan
16 years ago

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

#8 @eliascn
16 years ago

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

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

#9 @DD32
16 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

#10 @DD32
16 years ago

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