rename var

This commit is contained in:
iamqizhao 2015-07-24 17:38:26 -07:00
parent 67cc94f56a
commit 7ee8af59ef
1 changed files with 3 additions and 3 deletions

View File

@ -164,13 +164,13 @@ func newHPACKDecoder() *hpackDecoder {
default: default:
if !isReservedHeader(f.Name) { if !isReservedHeader(f.Name) {
if f.Name == "user-agent" { if f.Name == "user-agent" {
ind := strings.LastIndex(f.Value, " ") i := strings.LastIndex(f.Value, " ")
if ind == -1 { if i == -1 {
// There is no application user agent string being set. // There is no application user agent string being set.
return return
} }
// Extract the application user agent string. // Extract the application user agent string.
f.Value = f.Value[:ind] f.Value = f.Value[:i]
} }
if d.state.mdata == nil { if d.state.mdata == nil {
d.state.mdata = make(map[string]string) d.state.mdata = make(map[string]string)