Page MenuHomePhabricator

Content of a 400 Bad Request response does not fit to the Content-Type
Closed, ResolvedPublic

Description

A GET request to https://www.mediawiki.org/wiki/Special:RunJobs returns the correct HTTP status code 400 Bad Request, but with not correct specified content: It has the HTTP header Content-Type: text/html and the plain text content Request must be POSTed.

$ curl -i --http1.1 https://www.mediawiki.org/wiki/Special:RunJobs
HTTP/1.1 400 Bad Request
[...]
Content-Type: text/html
[...]

Request must be POSTed

https://validator.w3.org/check?uri=https%3A%2F%2Fwww.mediawiki.org%2Fwiki%2FSpecial%3ARunJobs&No200=1

Expected result: Either the Content-Type is text/plain or the content text is a HTML document.

Event Timeline

Fomafix created this task.Sep 24 2016, 6:41 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 24 2016, 6:41 PM
Fomafix claimed this task.Sep 24 2016, 7:15 PM
Fomafix triaged this task as Low priority.

Change 312650 had a related patch set uploaded (by Fomafix):
SpecialRunJobs: Use wfHttpError to generate error messages

https://gerrit.wikimedia.org/r/312650

Change 312650 merged by jenkins-bot:
SpecialRunJobs: Use wfHttpError to generate error messages

https://gerrit.wikimedia.org/r/312650

Krinkle closed this task as Resolved.Dec 15 2016, 7:22 AM