aboutsummaryrefslogtreecommitdiff
path: root/header_test.go
diff options
context:
space:
mode:
authorGravatar AlphaBaby <fujianhao1997@qq.com> 2021-02-08 04:13:36 +0800
committerGravatar GitHub <noreply@github.com> 2021-02-07 21:13:36 +0100
commita88030b8fbcabe7010ff0a8f037e46c64475e56e (patch)
tree98f1d3406b2084cfa633dd01d1765a077daf4a28 /header_test.go
parentFix clientGetURLDeadline (diff)
downloadfasthttp-a88030b8fbcabe7010ff0a8f037e46c64475e56e.tar.gz
fasthttp-a88030b8fbcabe7010ff0a8f037e46c64475e56e.tar.bz2
fasthttp-a88030b8fbcabe7010ff0a8f037e46c64475e56e.zip
fix gracefilly shutdown bug, issue #958 (#960)v1.20.0
* fix gracefilly shutdown bug, issue #958 * fix golangci-lint * add option: CloseOnShutdown into Sever * Update server.go Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com> * Update server.go Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com> Co-authored-by: fujianhao3 <fujianhao3@jd.com> Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
Diffstat (limited to 'header_test.go')
-rw-r--r--header_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/header_test.go b/header_test.go
index 0fcca30..f82d221 100644
--- a/header_test.go
+++ b/header_test.go
@@ -2479,6 +2479,12 @@ func verifyResponseHeader(t *testing.T, h *ResponseHeader, expectedStatusCode, e
}
}
+func verifyResponseHeaderConnection(t *testing.T, h *ResponseHeader, expectConnection string) {
+ if string(h.Peek(HeaderConnection)) != expectConnection {
+ t.Fatalf("Unexpected Connection %q. Expected %q", h.Peek(HeaderConnection), expectConnection)
+ }
+}
+
func verifyRequestHeader(t *testing.T, h *RequestHeader, expectedContentLength int,
expectedRequestURI, expectedHost, expectedReferer, expectedContentType string) {
if h.ContentLength() != expectedContentLength {