[Mongrel] HTTP parse error due to an extra percent sign

Stephan Wehner stephanwehner at gmail.com
Wed Jan 7 15:00:14 EST 2009

On Wed, Jan 7, 2009 at 11:44 AM, Robbie Allen <lists at ruby-forum.com> wrote:
> If you append an extra percent sign to a URL that gets passed to
> mongrel, it will return a Bad Request error.  Kind of odd that
> "http://localhost/%" causes a "Bad Request" instead of a "Not Found"
> error.
> Here is the error from the mongrel log:
> HTTP parse error, malformed request (
> #<Mongrel::HttpParserError: Invalid HTTP format, parsing fails.>
> I'm using Nginx in front of mongrel.  I understand this is a bad URL,
> but is there anyway to have mongrel ignore lone percent signs?  Or
> perhaps a Nginx rewrite rule that will encode extraneous percent signs?

Out of curiousity, why does mongrel's handling of this case bother you?
Looks like entirely standard behaviour, see


(All produce status 400)


> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

Stephan Wehner

-> http://stephan.sugarmotor.org
-> http://www.thrackle.org
-> http://www.buckmaster.ca
-> http://www.trafficlife.com
-> http://stephansmap.org -- blog.stephansmap.org

More information about the Mongrel-users mailing list