diff options
author | Oleksandr Redko <Oleksandr_Redko@epam.com> | 2023-06-13 16:18:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 15:18:59 +0200 |
commit | ffdf59d04ca2f02556308d60d37b8e77ea04484c (patch) | |
tree | cad591ac557fce7673b2c7d52a6863c7694b4e37 /http_test.go | |
parent | add DisableSpecialHeaders option (#1573) (diff) | |
download | fasthttp-ffdf59d04ca2f02556308d60d37b8e77ea04484c.tar.gz fasthttp-ffdf59d04ca2f02556308d60d37b8e77ea04484c.tar.bz2 fasthttp-ffdf59d04ca2f02556308d60d37b8e77ea04484c.zip |
Diffstat (limited to 'http_test.go')
-rw-r--r-- | http_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/http_test.go b/http_test.go index ae56b91..d4717f6 100644 --- a/http_test.go +++ b/http_test.go @@ -2070,7 +2070,8 @@ func TestResponseReadWithoutBody(t *testing.T) { } func testResponseReadWithoutBody(t *testing.T, resp *Response, s string, skipBody bool, - expectedStatusCode, expectedContentLength int, expectedContentType string, expectedTrailer map[string]string) { + expectedStatusCode, expectedContentLength int, expectedContentType string, expectedTrailer map[string]string, +) { r := bytes.NewBufferString(s) rb := bufio.NewReader(r) resp.SkipBody = skipBody @@ -2140,7 +2141,8 @@ func TestResponseSuccess(t *testing.T) { } func testResponseSuccess(t *testing.T, statusCode int, contentType, serverName, body string, - expectedStatusCode int, expectedContentType, expectedServerName string) { + expectedStatusCode int, expectedContentType, expectedServerName string, +) { var resp Response resp.SetStatusCode(statusCode) resp.Header.Set("Content-Type", contentType) @@ -2310,7 +2312,6 @@ func TestResponseReadSuccess(t *testing.T) { // chunked response with chunk extension testResponseReadSuccess(t, resp, "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nTransfer-Encoding: chunked\r\n\r\n3;ext\r\naaa\r\n0\r\nFoo6: bar6\r\n\r\n", 200, -1, "text/html", "aaa", map[string]string{"Foo6": "bar6"}) - } func TestResponseReadError(t *testing.T) { @@ -2349,8 +2350,8 @@ func testResponseReadError(t *testing.T, resp *Response, response string) { } func testResponseReadSuccess(t *testing.T, resp *Response, response string, expectedStatusCode, expectedContentLength int, - expectedContentType, expectedBody string, expectedTrailer map[string]string) { - + expectedContentType, expectedBody string, expectedTrailer map[string]string, +) { r := bytes.NewBufferString(response) rb := bufio.NewReader(r) err := resp.Read(rb) @@ -3119,7 +3120,6 @@ func TestRequestMultipartFormPipeEmptyFormField(t *testing.T) { var b bytes.Buffer bw := bufio.NewWriter(&b) err := writeBodyChunked(bw, pr) - if err != nil { t.Fatalf("unexpected error: %v", err) } |