mirror of https://github.com/grpc/grpc-go.git
rename var
This commit is contained in:
parent
67cc94f56a
commit
7ee8af59ef
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue