@@ -1518,7 +1518,6 @@ func TestRequestHeaderConnectionClose(t *testing.T) {
15181518 if string (h1 .Peek (HeaderConnection )) != "close" {
15191519 t .Fatalf ("unexpected connection value: %q. Expecting %q" , h .Peek ("Connection" ), "close" )
15201520 }
1521-
15221521}
15231522
15241523func TestRequestHeaderSetCookie (t * testing.T ) {
@@ -1753,7 +1752,6 @@ func TestResponseHeaderAddTrailerError(t *testing.T) {
17531752 if trailer := string (h .Peek (HeaderTrailer )); trailer != expectedTrailer {
17541753 t .Fatalf ("unexpected trailer %q. Expected %q" , trailer , expectedTrailer )
17551754 }
1756-
17571755}
17581756
17591757func TestRequestHeaderAddTrailerError (t * testing.T ) {
@@ -1769,7 +1767,6 @@ func TestRequestHeaderAddTrailerError(t *testing.T) {
17691767 if trailer := string (h .Peek (HeaderTrailer )); trailer != expectedTrailer {
17701768 t .Fatalf ("unexpected trailer %q. Expected %q" , trailer , expectedTrailer )
17711769 }
1772-
17731770}
17741771
17751772func TestResponseHeaderCookie (t * testing.T ) {
@@ -2789,7 +2786,8 @@ func testRequestHeaderReadSecuredError(t *testing.T, h *RequestHeader, headers s
27892786}
27902787
27912788func testResponseHeaderReadSuccess (t * testing.T , h * ResponseHeader , headers string , expectedStatusCode , expectedContentLength int ,
2792- expectedContentType string ) {
2789+ expectedContentType string ,
2790+ ) {
27932791 r := bytes .NewBufferString (headers )
27942792 br := bufio .NewReader (r )
27952793 err := h .Read (br )
@@ -2800,7 +2798,8 @@ func testResponseHeaderReadSuccess(t *testing.T, h *ResponseHeader, headers stri
28002798}
28012799
28022800func testRequestHeaderReadSuccess (t * testing.T , h * RequestHeader , headers string , expectedContentLength int ,
2803- expectedRequestURI , expectedHost , expectedReferer , expectedContentType string , expectedTrailer map [string ]string ) {
2801+ expectedRequestURI , expectedHost , expectedReferer , expectedContentType string , expectedTrailer map [string ]string ,
2802+ ) {
28042803 r := bytes .NewBufferString (headers )
28052804 br := bufio .NewReader (r )
28062805 err := h .Read (br )
@@ -2832,7 +2831,8 @@ func verifyResponseHeaderConnection(t *testing.T, h *ResponseHeader, expectConne
28322831}
28332832
28342833func verifyRequestHeader (t * testing.T , h * RequestHeader , expectedContentLength int ,
2835- expectedRequestURI , expectedHost , expectedReferer , expectedContentType string ) {
2834+ expectedRequestURI , expectedHost , expectedReferer , expectedContentType string ,
2835+ ) {
28362836 if h .ContentLength () != expectedContentLength {
28372837 t .Fatalf ("Unexpected Content-Length %d. Expected %d" , h .ContentLength (), expectedContentLength )
28382838 }
@@ -2922,6 +2922,7 @@ func TestRequestHeader_PeekAll(t *testing.T) {
29222922 expectRequestHeaderAll (t , h , HeaderHost , [][]byte {})
29232923 expectRequestHeaderAll (t , h , "aaa" , [][]byte {})
29242924}
2925+
29252926func expectRequestHeaderAll (t * testing.T , h * RequestHeader , key string , expectedValue [][]byte ) {
29262927 if len (h .PeekAll (key )) != len (expectedValue ) {
29272928 t .Fatalf ("Unexpected size for key %q: %d. Expected %d" , key , len (h .PeekAll (key )), len (expectedValue ))
0 commit comments