File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 196
196
- [ PERFORMANCE] Misc code optimizations. Inlining, tail call optimizations
197
197
- [ NEW] Built-in support for golang.org/x/net/context
198
198
- [ NEW] Any(path, handler). Create a route that matches any path
199
- - [ NEW] Refactored rendering pipeline (faster and static typeded )
199
+ - [ NEW] Refactored rendering pipeline (faster and static typed )
200
200
- [ NEW] Refactored errors API
201
201
- [ NEW] IndentedJSON() prints pretty JSON
202
202
- [ NEW] Added gin.DefaultWriter
295
295
- [ FIX] Recovery() middleware only prints panics
296
296
- [ FIX] Context.Get() does not panic anymore. Use MustGet() instead.
297
297
- [ FIX] Multiple http.WriteHeader() in NotFound handlers
298
- - [ FIX] Engine.Run() panics if http server can't be setted up
298
+ - [ FIX] Engine.Run() panics if http server can't be set up
299
299
- [ FIX] Crash when route path doesn't start with '/'
300
300
- [ FIX] Do not update header when status code is negative
301
301
- [ FIX] Setting response headers before calling WriteHeader in context.String()
Original file line number Diff line number Diff line change @@ -1003,20 +1003,20 @@ func (c *Context) NegotiateFormat(offered ...string) string {
1003
1003
return offered [0 ]
1004
1004
}
1005
1005
for _ , accepted := range c .Accepted {
1006
- for _ , offert := range offered {
1006
+ for _ , offer := range offered {
1007
1007
// According to RFC 2616 and RFC 2396, non-ASCII characters are not allowed in headers,
1008
1008
// therefore we can just iterate over the string without casting it into []rune
1009
1009
i := 0
1010
1010
for ; i < len (accepted ); i ++ {
1011
- if accepted [i ] == '*' || offert [i ] == '*' {
1012
- return offert
1011
+ if accepted [i ] == '*' || offer [i ] == '*' {
1012
+ return offer
1013
1013
}
1014
- if accepted [i ] != offert [i ] {
1014
+ if accepted [i ] != offer [i ] {
1015
1015
break
1016
1016
}
1017
1017
}
1018
1018
if i == len (accepted ) {
1019
- return offert
1019
+ return offer
1020
1020
}
1021
1021
}
1022
1022
}
You can’t perform that action at this time.
0 commit comments