sinatra/sinatra — Issue #403: Parsing of paths with adjacent slashes was regressed in 1.3.0
Author: philc
Created: 2011-11-08 23:31:19+00:00
State: open

When parsing the request path, Sinatra is dropping a slash if the path contains two adjacent slashes. This is a regression.

In 1.2.6 from request.env:

"REQUEST_URI" =>"/v2//parent/child",
"REQUEST_PATH"=>"/v2//parent/child"

In 1.3.0 and 1.3.1 from request.env:

"REQUEST_URI" =>"/v2//parent/child",
"REQUEST_PATH"=>"/v2/parent/child"

For reference URI.parse maintains the double slash as expected:

URI.parse("http://google.com/1//23").path
=> "/1//23"