Page MenuHomePhabricator

"Bad title" error page returns HTTP 200 OK instead of an error code
Closed, ResolvedPublic

Description

"Bad title" page is served with an HTTP 200 "OK" response, should be 400 or maybe 403 or 404.

Blocks bug 33628 -- mobile client is unable to determine that this was an error case because the page comes back without an HTTP-level error indication.


Version: unspecified
Severity: normal
URL: http://en.wikipedia.org/wiki/%23

Details

Reference
bz33646

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:06 AM
bzimport set Reference to bz33646.
bzimport added a subscriber: Unknown Object (MLST).

We could create a BadTitleError exception which would just call ErrorPageError( 'bad title', 'badtitletext' ) and set the 400 error code.

sumanah wrote:

Marked "easy" because hashar placed this on the http://www.mediawiki.org/wiki/Annoying_Little_Bug page.

philinje wrote:

Brion, who is the right person for this? And should we make any dependency on this in forthcoming mobile releases?

Phil > I guess that kind of bug is for Platform Engineering (I am a member of that team).

I did not notice it was blocking for Mobile applications.

Tagging +platformeng.

Added a new exception class with r110001.

philinje wrote:

Great, thanks! When might this change actually appear in production?

(In reply to comment #6)

Great, thanks! When might this change actually appear in production?

The process is to have the change pair reviewed. Then it is applied to the production branch and then deployed by someone with shell access.

The change was merged by Roan Kattouw a few minutes ago with r110368 and applied on live site:

$ curl -I 'http://en.wikipedia.org/wiki/%5B%5B'
HTTP/1.0 400 Bad Request
<snip>

So that is live :-)