[rspec-users] redirects while using subdomains not working in 4.1
Tom Hoen
lists at ruby-forum.com
Fri Feb 6 14:25:41 EST 2009
Zach Dennis wrote:
>
> Correction -- I believe his problem forces the problem in my ticket to
> be solved. I don't know if my patch solves his problem.
>
Zach - Thanks for the quick patch
I grabbed your code, but it did not solve the problem. Here is what I am
seeing.
When fully_qualify_current_url is called, it uses current_host to build
the fully qualified url. However, current_host checks whether
current_url has a value (which it doesn't at first) and returns
"www.example.com" as the host. So I am always getting
"http://www.example.com/<action>" as the url. This makes
internal_redirect? return false (as the host in the current_host is
different from that in the response.header("Location").
Looking at the actual response, it has the correct host in the HTTP_HOST
value, but I can't figure out how to get to it (though i continue to
look) and am not sure if it is appropriate to use as a comparison to the
"Location" host.
Any thoughts on this?
Tom
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list