forked from quic-go/quic-go
fix writing of multiple headers with the same name
This commit is contained in:
committed by
Lucas Clemente
parent
f511eb0001
commit
02b50e2ffb
@@ -49,7 +49,9 @@ func (w *responseWriter) WriteHeader(status int) {
|
||||
enc.WriteField(hpack.HeaderField{Name: ":status", Value: strconv.Itoa(status)})
|
||||
|
||||
for k, v := range w.header {
|
||||
enc.WriteField(hpack.HeaderField{Name: strings.ToLower(k), Value: v[0]})
|
||||
for index := range v {
|
||||
enc.WriteField(hpack.HeaderField{Name: strings.ToLower(k), Value: v[index]})
|
||||
}
|
||||
}
|
||||
|
||||
utils.Infof("Responding with %d", status)
|
||||
|
||||
Reference in New Issue
Block a user