[wp-trac] [WordPress Trac] #38427: wp-cron.php: POST-request, but content-length missing

WordPress Trac noreply at wordpress.org
Mon Apr 1 13:34:57 UTC 2019


#38427: wp-cron.php: POST-request, but content-length missing
--------------------------+--------------------------------
 Reporter:  mozai         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  HTTP API      |     Version:  4.6
 Severity:  normal        |  Resolution:  reported-upstream
 Keywords:                |     Focuses:
--------------------------+--------------------------------
Changes (by desrosj):

 * keywords:  needs-patch =>
 * status:  new => closed
 * resolution:   => reported-upstream
 * milestone:  Future Release =>


Old description:

> This appears to be a return of bug #8605
>
> Environment: Wordpress 4.6.1, lighttpd 1.4.35, PHP 7.0.8
>
> Seen:
> '''access_log''': [17/Oct/2016:22:51:36 -0400] "POST /main/wp-
> cron.php?doing_wp_cron=1476759096.5852251052856445312500 HTTP/1.1" 411
> 357 "-" "WordPress/4.6.1; http://www.[omitted].com/main"
> '''error_log''': 2016-10-20 22:51:36: (request.c.1125) POST-request, but
> content-length missing -> 411
>
> Other info:
> - there are no successful calls to wp-cron; it is always error 411
> - HTTP result code 411 is "Length required". RFC2616 Section 14.13 says
> Content-Length header "SHOULD" be included.  In practice, it is not used
> for GET nor HEAD requests, but is expected for POST requests.
> - This error happens hundreds of times each day and oddly the error
> appears in a different "error_log" than expected; the webserver uses
> name-based virtual hosts, but the error messages are landing in the
> default name-less error_log file, as if not only the "Content-Length:"
> header is missing but also the "Host:" header.

New description:

 This appears to be a return of bug #8605

 Environment: WordPress 4.6.1, lighttpd 1.4.35, PHP 7.0.8

 Seen:
 '''access_log''': [17/Oct/2016:22:51:36 -0400] "POST /main/wp-
 cron.php?doing_wp_cron=1476759096.5852251052856445312500 HTTP/1.1" 411 357
 "-" "WordPress/4.6.1; http://www.[omitted].com/main"
 '''error_log''': 2016-10-20 22:51:36: (request.c.1125) POST-request, but
 content-length missing -> 411

 Other info:
 - there are no successful calls to wp-cron; it is always error 411
 - HTTP result code 411 is "Length required". RFC2616 Section 14.13 says
 Content-Length header "SHOULD" be included.  In practice, it is not used
 for GET nor HEAD requests, but is expected for POST requests.
 - This error happens hundreds of times each day and oddly the error
 appears in a different "error_log" than expected; the webserver uses name-
 based virtual hosts, but the error messages are landing in the default
 name-less error_log file, as if not only the "Content-Length:" header is
 missing but also the "Host:" header.

--

Comment:

 Looks like [https://github.com/rmccue/Requests/pull/318 there is an open
 PR for this]. I am going to close this as `reported-upstream`. When a new
 version of Requests is released, this will be included when Core receives
 the update.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/38427#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list