write http headers in lower case

fixes #317
This commit is contained in:
Lucas Clemente
2016-09-04 11:38:10 +02:00
parent aa16873794
commit e856c08645
2 changed files with 3 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import (
"bytes"
"net/http"
"strconv"
"strings"
"sync"
"github.com/lucas-clemente/quic-go/protocol"
@@ -48,7 +49,7 @@ 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: k, Value: v[0]})
enc.WriteField(hpack.HeaderField{Name: strings.ToLower(k), Value: v[0]})
}
utils.Infof("Responding with %d", status)