Last modified: 2014-06-19 12:22:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68769, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66769 - POST request sent without content-length creates entries in lighttpd's error.log
POST request sent without content-length creates entries in lighttpd's error.log
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-18 08:38 UTC by Christian Kujau
Modified: 2014-06-19 12:22 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Christian Kujau 2014-06-18 08:38:47 UTC
For every request, lighttpd/1.4.31 was logging the following to error.log:

2014-06-18 10:13:56: (request.c.1148) POST-request, but content-length missing -> 411 

While these POST requests for every page view seem to be caused by bug 66225, it still seems wrong that a POST request is sent but its content-length is missing.

I've come across at least two other projects where this was fixed:

* https://core.trac.wordpress.org/ticket/8605
* http://bitten.edgewall.org/ticket/667

Can this be fixed in MediaWiki as well?

./includes/libs/MultiHttpClient.php does contain:

-------------------------------------------------
} elseif ( $req['method'] === 'POST' ) {
                        curl_setopt( $ch, CURLOPT_POST, 1 );
                        curl_setopt( $ch, CURLOPT_POSTFIELDS, $req['body'] );
                } else {
                        if ( is_resource( $req['body'] ) || $req['body'] !== '' ) {
                                throw new Exception( "HTTP body specified for a non PUT/POST request." );
                        }
                        $req['headers']['content-length'] = 0;
-------------------------------------------------

So, "content-length" is indeed set, but I don't know how to get a call chain to see if this method is really used here.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links