From: Patrick Westerhoff Date: Mon, 20 Oct 2014 21:40:20 +0000 (+0200) Subject: Add Content-Length header for job queue requests X-Git-Tag: 1.31.0-rc.0~13549^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=224fa32920b23e9ff2d32a98bcd3c8ab414847fd;p=lhc%2Fweb%2Fwiklou.git Add Content-Length header for job queue requests Include the Content-Length header in job queue POST requests to meet the requirement by certain servers, avoiding HTTP 411 responses. Bug: 72274 Change-Id: Icf34bca58c792225d735d576213d6887015459ca --- diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 87468bd2bf..9585c5f589 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -682,7 +682,7 @@ class MediaWiki { } $url = wfAppendQuery( wfScript( 'index' ), $query ); - $req = "POST $url HTTP/1.1\r\nHost: {$info['host']}\r\nConnection: Close\r\n\r\n"; + $req = "POST $url HTTP/1.1\r\nHost: {$info['host']}\r\nConnection: Close\r\nContent-Length: 0\r\n\r\n"; wfDebugLog( 'runJobs', "Running $n job(s) via '$url'\n" ); // Send a cron API request to be performed in the background.