Commit fd4bcd9f09305c057e91a4f791c74d00da9ac143

Authored by Wouter D'Haeseleer
1 parent e6c0673e

Fixing request.fullpath URL encoding

Let's assume your path is = "project/tree/master/This%20Is%20valid"
In this case gitlab renders a 404.

To fix this we should decode the path so that it looks like
"project/tree/master/This Is valid"
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/extracts_path.rb
@@ -108,7 +108,7 @@ module ExtractsPath @@ -108,7 +108,7 @@ module ExtractsPath
108 request.format = :atom 108 request.format = :atom
109 end 109 end
110 110
111 - path = request.fullpath.dup 111 + path = CGI::unescape(request.fullpath.dup)
112 112
113 @ref, @path = extract_ref(path) 113 @ref, @path = extract_ref(path)
114 114