aboutsummaryrefslogtreecommitdiff
path: root/strings.go
diff options
context:
space:
mode:
authorGravatar ichx <czn16@qq.com> 2021-12-05 21:11:51 +0800
committerGravatar GitHub <noreply@github.com> 2021-12-05 14:11:51 +0100
commitda7ff7a2080953e370e8bd712f5ae8ef8b0cb4e1 (patch)
treed361832c2ab7da262ce69a646377cf3301968cca /strings.go
parentfix: reset request after reset user values on keep-alive connections (#1162) (diff)
downloadfasthttp-da7ff7a2080953e370e8bd712f5ae8ef8b0cb4e1.tar.gz
fasthttp-da7ff7a2080953e370e8bd712f5ae8ef8b0cb4e1.tar.bz2
fasthttp-da7ff7a2080953e370e8bd712f5ae8ef8b0cb4e1.zip
Add trailer support (#1165)
* Add trailer support * fix issue and add documentation * remove redundant code * add error return for add/set trailer method * fix lint error * fix bad trailer error return issue and update bad content-length error * update errNonNumericChars * update errNonNumericChars * fix issue about error and fix typo
Diffstat (limited to 'strings.go')
-rw-r--r--strings.go50
1 files changed, 29 insertions, 21 deletions
diff --git a/strings.go b/strings.go
index e28eaac..e4fb08b 100644
--- a/strings.go
+++ b/strings.go
@@ -20,31 +20,39 @@ var (
strColon = []byte(":")
strColonSlashSlash = []byte("://")
strColonSpace = []byte(": ")
+ strCommaSpace = []byte(", ")
strGMT = []byte("GMT")
strResponseContinue = []byte("HTTP/1.1 100 Continue\r\n\r\n")
- strExpect = []byte(HeaderExpect)
- strConnection = []byte(HeaderConnection)
- strContentLength = []byte(HeaderContentLength)
- strContentType = []byte(HeaderContentType)
- strDate = []byte(HeaderDate)
- strHost = []byte(HeaderHost)
- strReferer = []byte(HeaderReferer)
- strServer = []byte(HeaderServer)
- strTransferEncoding = []byte(HeaderTransferEncoding)
- strContentEncoding = []byte(HeaderContentEncoding)
- strAcceptEncoding = []byte(HeaderAcceptEncoding)
- strUserAgent = []byte(HeaderUserAgent)
- strCookie = []byte(HeaderCookie)
- strSetCookie = []byte(HeaderSetCookie)
- strLocation = []byte(HeaderLocation)
- strIfModifiedSince = []byte(HeaderIfModifiedSince)
- strLastModified = []byte(HeaderLastModified)
- strAcceptRanges = []byte(HeaderAcceptRanges)
- strRange = []byte(HeaderRange)
- strContentRange = []byte(HeaderContentRange)
- strAuthorization = []byte(HeaderAuthorization)
+ strExpect = []byte(HeaderExpect)
+ strConnection = []byte(HeaderConnection)
+ strContentLength = []byte(HeaderContentLength)
+ strContentType = []byte(HeaderContentType)
+ strDate = []byte(HeaderDate)
+ strHost = []byte(HeaderHost)
+ strReferer = []byte(HeaderReferer)
+ strServer = []byte(HeaderServer)
+ strTransferEncoding = []byte(HeaderTransferEncoding)
+ strContentEncoding = []byte(HeaderContentEncoding)
+ strAcceptEncoding = []byte(HeaderAcceptEncoding)
+ strUserAgent = []byte(HeaderUserAgent)
+ strCookie = []byte(HeaderCookie)
+ strSetCookie = []byte(HeaderSetCookie)
+ strLocation = []byte(HeaderLocation)
+ strIfModifiedSince = []byte(HeaderIfModifiedSince)
+ strLastModified = []byte(HeaderLastModified)
+ strAcceptRanges = []byte(HeaderAcceptRanges)
+ strRange = []byte(HeaderRange)
+ strContentRange = []byte(HeaderContentRange)
+ strAuthorization = []byte(HeaderAuthorization)
+ strTE = []byte(HeaderTE)
+ strTrailer = []byte(HeaderTrailer)
+ strMaxForwards = []byte(HeaderMaxForwards)
+ strProxyConnection = []byte(HeaderProxyConnection)
+ strProxyAuthenticate = []byte(HeaderProxyAuthenticate)
+ strProxyAuthorization = []byte(HeaderProxyAuthorization)
+ strWWWAuthenticate = []byte(HeaderWWWAuthenticate)
strCookieExpires = []byte("expires")
strCookieDomain = []byte("domain")