rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* Problem with redirects where a Rack app sits behind a proxy
@ 2010-11-28 14:21 Jon Leighton
  2010-11-28 14:46 ` Lee Hambley
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Leighton @ 2010-11-28 14:21 UTC (permalink / raw)
  To: Rack Development

Hi there,

I have encountered a problem with redirects with Sinatra proxied by
Apache. Basically, the port number of the backend application server
(Mongrel or whatever) will appear in the Location header.

I've done a fairly extensive investigation here: https://github.com/jonleighton/redirect_test

If you read README.md it basically explains everything in detail, but
what it boils down to is this: Rack::Request#port is incorrect, in
that it uses SERVER_PORT when no explicit port is given by
host_with_port.

Rails is not affected, since it implements its own
ActionDispatch::Request#port method. I believe the Rails
implementation is correct and should be implemented in Rack.

If people agree with this analysis then I'm happy to produce a patch
against Rack.

Cheers,
Jon

--
http://jonathanleighton.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-28 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-28 14:21 Problem with redirects where a Rack app sits behind a proxy Jon Leighton
2010-11-28 14:46 ` Lee Hambley
2010-11-28 15:22   ` Jon Leighton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).