mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
http: introduce Header type, implement with net/textproto
textproto: introduce Header type websocket: use new interface to access Header R=rsc, mattn CC=golang-dev https://golang.org/cl/4185053
This commit is contained in:
parent
07cc8b9ad2
commit
b8fa61885a
20 changed files with 263 additions and 335 deletions
|
|
@ -22,7 +22,7 @@ var respWriteTests = []respWriteTest{
|
|||
ProtoMajor: 1,
|
||||
ProtoMinor: 0,
|
||||
RequestMethod: "GET",
|
||||
Header: map[string]string{},
|
||||
Header: map[string][]string{},
|
||||
Body: nopCloser{bytes.NewBufferString("abcdef")},
|
||||
ContentLength: 6,
|
||||
},
|
||||
|
|
@ -38,7 +38,7 @@ var respWriteTests = []respWriteTest{
|
|||
ProtoMajor: 1,
|
||||
ProtoMinor: 0,
|
||||
RequestMethod: "GET",
|
||||
Header: map[string]string{},
|
||||
Header: map[string][]string{},
|
||||
Body: nopCloser{bytes.NewBufferString("abcdef")},
|
||||
ContentLength: -1,
|
||||
},
|
||||
|
|
@ -53,7 +53,7 @@ var respWriteTests = []respWriteTest{
|
|||
ProtoMajor: 1,
|
||||
ProtoMinor: 1,
|
||||
RequestMethod: "GET",
|
||||
Header: map[string]string{},
|
||||
Header: map[string][]string{},
|
||||
Body: nopCloser{bytes.NewBufferString("abcdef")},
|
||||
ContentLength: 6,
|
||||
TransferEncoding: []string{"chunked"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue