Description

I've installed MoinMoin 1.5.0 with the WSGI adapter; the latter is using the flup library to talk to the web server.

RequestBase.http_redirect() sends the following header:

Status: 302

Unfortunately its value is shorter than 4 chars and that makes flup raise an exception.

Steps to reproduce

I've triggered the error by making a full-text search.

Workaround

A quick solution consists in editing request.py, replacing the "Status: 302" string with:

Status: 302 Found

Discussion

The 302 in request.py as mentioned appears to be the only place in the moin code which doesn't have a reason string after it.

I would argue that this is indeed a moin bug and not a flup bug. According the the WSGI PEP 333 it re-iterates the HTTP spec in RFC 2616 Which in section 6.1.1 says the status response is:

HTTP-Version SP Status-Code SP Reason-Phrase CRLF
Status-Code = 3DIGIT
Reason-Phrase = *<TEXT, excluding CR, LF>

Now, the Reason-Phrase can be zero-length, but the space immediately before it is not optional. Patch should be trivial though. -- DeronMeranda 2006-01-12 23:32:13

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/HttpStatusTooShort (last edited 2007-10-29 19:08:41 by localhost)