[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

mongrel/webrick redirect_to discrepancy

_blackdog

2/14/2006 3:37:00 PM

hi,

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
URL

http://myserver/content/redirected_url

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

http://myserver:8081/content/redirected_url


thanks

BD.

1 Answer

Zed A. Shaw

2/15/2006 1:12:00 AM

0

Let me look at this. I believe the whole way the redirects are done via the
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 the
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
http://www.ze...


On 2/14/06 10:38 AM, "_blackdog" <rmt512@gmail.com> wrote:

> hi,
>
> 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
> URL
>
> http://myserver/content/redirected_url
>
> when I use mongrel, the redirected URL contains the 8081 port,
>
> http://myserver:8081/content/redirected_url
>
>
> thanks
>
> BD.
>
>