
RackTestSession should not send URI encoded parameters to Rack app
Reported by Derek Kastner | May 22nd, 2009 @ 09:36 AM
When using webrat's RackTestSession adapter to test a rack app, form and URI parameters are URI encoded by webrat. The parameters are sent directly into the tested rack app's env, still encoded. RackTestSession needs to decode these parameters before sending to rack.
Patch is at: http://github.com/gdi/webrat/commit/68f268a82d615d4d05fc1a25431598e...
Comments and changes to this ticket
-
Derek Kastner May 22nd, 2009 @ 02:14 PM
On second thought, I'm going to see if replicating the way the sinatra adapter works will work better. I'm currently working on a fix for getting the correct cookies when the HTTP_HOST request header is set to something other than example.com.
-
Derek Kastner May 22nd, 2009 @ 03:20 PM
OK, here is a more concise commit that fixes the problem and uses Rack::Utils#unescape instead of URI.decode: http://github.com/gdi/webrat/commit/609cb97d9b672b10808cd9c5fede6e8...
-
gaffo May 28th, 2009 @ 07:19 PM
- Tag changed from parameters, patch, rack, test to parameters, patch, rack, test, verify
- State changed from new to awaiting-merge
- Assigned user set to Bryan Helmkamp
Thanks for the patch,
I'm not really the rack expert so I'm going to defer to Brynary for now. -
Larry Diehl June 6th, 2009 @ 03:43 AM
Got this working, and also got setting the simulated HTTP_HOST working.
Re-wrote the integration rack tests based on the existing sinatra integration tests, and got them all passing after the above was implemented.
http://github.com/larrytheliquid/webrat/commit/e42ee96a2c94ffba56f8...
-
gaffo June 6th, 2009 @ 06:13 PM
Looks good. Need to test and merge. Its gonna invalidate a bunch of code but that's a good thing.
-
Simon Rozet June 24th, 2009 @ 06:48 PM
- Assigned user changed from Bryan Helmkamp to Simon Rozet
- State changed from awaiting-merge to hold
-
Simon Rozet June 24th, 2009 @ 06:54 PM
- State changed from hold to open
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.