
[patch] remove vestiges of normalizing rails urls before action
Reported by Adam greene | January 16th, 2009 @ 03:16 PM | in 0.4.1
hey guys,
Here is my use case. with my previous patch on internal_redirect? ignoring subdomains, the fact that #do_request strips out host information becomes an issue. My app, as well as many others I imagine, will redirect users to their appropriate subdomain if they aren't in it, but if the host information is stripped then my app keeps seeing the old host and it goes into an infinite redirecting loop.
I imagine this logic was there to try and work around the redirecting issue, but now that I think Josh came up with a nice solution for that, I suggest that this logic is removed.
If our belief is that testing frameworks should emulate the
'real world' as much as possible, then normalizing url's does not
do us any favors.
Please let me know if you have questions. Thanks, Adam
Comments and changes to this ticket
-
-
Bryan Helmkamp January 17th, 2009 @ 11:34 AM
- Milestone set to 0.4
-
Bryan Helmkamp January 20th, 2009 @ 12:30 AM
- Milestone changed from 0.4 to 0.4.1
-
-
Adam greene January 20th, 2009 @ 07:47 PM
ah great! I wasn't sure if this was too 'radical' a change! I'm glad it works and fits in with the 'big plan'
-
Josh Knowles January 20th, 2009 @ 07:52 PM
Ok so I may have pre-maturely pulled this in. Trying in my reference app and getting some errors. I'll poke at it a bit, but this may need to wait until after 0.4.1 (tomorrow) when we have more time to track down the implications of this change.
-
Josh Knowles January 20th, 2009 @ 08:12 PM
- State changed from resolved to open
Ok so unfortunately this is breaking our Rails integration specs which pass in anchor tags. I like the intent behind this, however I want to hold off until post 0.4.1 so that i have more time to understand the ramifications on Rails.
-
Zach Dennis January 20th, 2009 @ 09:08 PM
We got bit by not having Webrat correctly handle subdomains. When normalizing_urls it only used the path -- always.
Here's a patch for correctly preserving the URI. It doesn't modify the existing anchor functionality,
-
Josh Knowles January 20th, 2009 @ 09:34 PM
Thanks Zach, running against weplay integration suite now, things look good so far.
Adam does this do everything you needed?
-
Adam greene January 21st, 2009 @ 12:01 AM
it does!
out of curiosity, why strip out the anchors? Why is that a 'bad thing'?
but this fix definitely works for me! Thanks zach for the patch. Adam
-
Josh Knowles January 21st, 2009 @ 12:31 PM
- State changed from open to resolved
I have no clue why we need to strip anchors, but when we don't Rails throws a fit saying that no route matches.
Could be a problem with our routes, but I suspect it to be a problem with the Rails integration session logic that we build on top of.
I'm going to close this out for now and do some research as to the correct approach to make things more browser-like.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.