Forum: Ruby mongrel/webrick redirect_to discrepancy

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
_blackdog (Guest)
on 2006-02-14 17:41
(Received via mailing list)

i'm running mongrel behind lighttpd proxy server, i redirect /xyz URLs
to port 8081so i can get dynamic content. sometimes this content
redirects e.g lighttpd config.

  "/content/" =>
            "host" =>"my IP address here",
            "port" => 8081
            )) ,

when I use rails redirect_to and webrick as the server i get the
desired transation of the URLS with no sign of 8081 in the redirected


when I use mongrel, the redirected URL contains the 8081 port,



Zed S. (Guest)
on 2006-02-15 03:13
(Received via mailing list)
Let me look at this.  I believe the whole way the redirects are done via
CGI library is not correct.  It looks like WEBrick may be doing some
form of
correction.  For example, CGI apparently uses a header of "location:" on
302 response, but WEBrick uses "Location:" and changes the response.

I've got a test case for this now so I'll sort it out.  Thanks for the
specific details on your setup.

Zed A. Shaw
This topic is locked and can not be replied to.