From 224fa32920b23e9ff2d32a98bcd3c8ab414847fd Mon Sep 17 00:00:00 2001 From: Patrick Westerhoff Date: Mon, 20 Oct 2014 23:40:20 +0200 Subject: [PATCH] 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 --- includes/MediaWiki.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.20.1