[PATCH] Rack::Utils.escape_path; Rack;:Utils.escape does not correctly escape for path strings
Reported by raggi | June 17th, 2009 @ 08:50 PM | in 1.x
Rack::Utils.escape is designed to escape strings that will be used in query parameters. In the path portion of an url, a space should be encoded as %20.
This patch adds support in Rack::Utils.escape for a second boolean argument to escape spaces correctly for paths, and adds a simple helper method Rack;:Utils.escape_path.
It may be desirable to alter this code to use two distinct constants, instead of constructing two extra objects (one string and one regex) during each call.
Comments and changes to this ticket
-
raggi June 17th, 2009 @ 08:51 PM
Whoops, the patch is in my path_escape branch over at github.
http://github.com/raggi/rack/tree/path_escape
git clone git@github.com:raggi/rack.git
git remote add raggi git@github.com:raggi/rack.git
-
raggi June 17th, 2009 @ 08:52 PM
Further details from other vendors: http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK23481
-
Ryan Tomayko June 18th, 2009 @ 03:30 AM
- Assigned user changed from raggi to Ryan Tomayko
- State changed from new to open
+1
-
josh August 3rd, 2009 @ 04:11 PM
- Milestone changed from 1.0 to 1.1
-
josh December 11th, 2009 @ 03:10 AM
- Milestone changed from 1.1 to 1.x
-
raggi May 3rd, 2011 @ 07:56 AM
- State changed from open to resolved
- Milestone order changed from 0 to 0
3e9c822
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 ยป