[Mongrel] 502 proxy error, malformed request

Brad Carson lists at ruby-forum.com
Wed Feb 6 23:24:34 EST 2008

Eden Li wrote:
> It's out of spec, so I'm guessing that's the reason it never made it
> in.  Apache, nginx and lighttpd all handle quotes transparently,
> however.  So you can do it with rewrite rules, but it's a tad hairy.
> This might work for you (not tested):
> RewriteCond %{QUERY_STRING} ^([^"]+)"(.*)
> RewriteRule ^/(.*) /$1\?%1\%22%2 [N]

Eden, thank you, that's great.  I've found it only works for the first " 
in Apache.

The double quotes in the URL are coming from a 3rd party, so I'm going 
to try my best to get them to properly escape their URLs.  Otherwise, is 
it possible to make a Rewrite rule to escape all the double quotes 
properly if a request is coming from IE?

Many thanks.
Posted via http://www.ruby-forum.com/.

More information about the Mongrel-users mailing list