New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RawPath and Unescape URL parameters #777
Conversation
Current coverage is 93.12% (diff: 75.00%)@@ develop #777 diff @@
==========================================
Files 16 16
Lines 1305 1310 +5
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 1217 1220 +3
- Misses 76 77 +1
- Partials 12 13 +1
|
|
Any hopes to get it merged? |
| @@ -276,14 +279,17 @@ func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) { | |||
| func (engine *Engine) handleHTTPRequest(context *Context) { | |||
| httpMethod := context.Request.Method | |||
| path := context.Request.URL.Path | |||
| if engine.UseRawPath && len(context.Request.URL.RawPath) > 0 { | |||
| path = context.Request.URL.RawPath | |||
| } | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gcnathan Could you write testing to improve code coverage? Thanks.
|
@gcnathan Any updates on this? |
|
@appleboy I'll check on how to do it. To be honest, it's quite the first time I'm playing with code coverage, so I'll check :) |
|
closed via #810 |
This patch aims to fix issue #722 and PR #640 .
I'm currently developing an API with URL parameters with, for example :
GET /user/:username
By assuming that username can contains special encoded parameters :
The first one is not decoded by using c.Params("username").
The second one, using '/' is currently not working at all.
Using the '*' character does not fix the issue as I've got sub routes :
GET /user/:username/infos
Feel free to comment. It aims to be a not-breaking change.