Created
June 4, 2014 17:32
-
-
Save chills42/e049f254622a7279faf0 to your computer and use it in GitHub Desktop.
Forward slash URI unescaping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
# I would expect '/ab' to respond with 'false' | |
# I also expect '/a%2Fb' to respond with 'true' | |
# Neither option should 404 | |
get '/:value' do |value| | |
(value=='a/b').to_s | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment