httprouter
httprouter copied to clipboard
allow router to use request.URL.RawPath
This addresses issue #208
When a path parameter contains url escaped characters (especially "/" as "%2F") it uses the raw path and doesn't automatically unescape the path.
This adds a field to the router struct called "UseRawPath" which allows for backward compatibility.
It seems that go 1.6 and 1.7 don't have url.PathUnescape.
It would be nice to version httprouter so that updated go src functions can be used. This PR could be merged into the latest release of httprouter but not affect previous versions.
Just noticed PR #55 Wow, that is an old one. Would love to get this functionality into httprouter :)
The tests on this seem to be failing. I have been using a forked version of this library to do this for a while; any chance you could update to fix the tests so that I can cherry-pick this commit instead?
@SamWhited I updated my fork to pull in changes since I made this PR but until Go 1.6 and 1.7 passing tests are no longer part the criteria, Travis will continue to fail. See my comment above. Glad this code change was useful to you.
Made a minor change and updated tests to pass code coverage
Ping. This is a very useful fix to a very long standing problem...
Any way to get this moving along?
@julienschmidt is there any reason why it's not merged yet?
@julienschmidt I updated this PR if it's helpful :)
@julienschmidt any update on this? I think this change could fix bugs in many other projects(example) which depend on httprouter
.
Also here looking for this. Any timelines on when this might be added? Thanks.
Hi, is there any update on this at all? (or issue #284) I really could use this being implemented. I could switch permanently to the gravitational fork, but that is 48 commits behind, and I could implement the capability locally I guess, but I'd rather stick with the original. I'm temporarily switching between the two to temporarily fix issues as they come up. Any feedback greatly appreciated. Appreciate time is a challenge. Many thanks for any assistance you can provide.