diff options
author | ichx <czn16@qq.com> | 2021-12-05 21:11:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-05 14:11:51 +0100 |
commit | da7ff7a2080953e370e8bd712f5ae8ef8b0cb4e1 (patch) | |
tree | d361832c2ab7da262ce69a646377cf3301968cca /strings.go | |
parent | fix: reset request after reset user values on keep-alive connections (#1162) (diff) | |
download | fasthttp-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.go | 50 |
1 files changed, 29 insertions, 21 deletions
@@ -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") |