mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-17 16:26:47 +03:00
Extracted predefined strings into a separate file
This commit is contained in:
@@ -10,41 +10,6 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
defaultServerName = []byte("fasthttp server")
|
||||
defaultContentType = []byte("text/plain; charset=utf-8")
|
||||
)
|
||||
|
||||
var (
|
||||
strSlash = []byte("/")
|
||||
strSlashSlash = []byte("//")
|
||||
strSlashDotDot = []byte("/..")
|
||||
strSlashDotDotSlash = []byte("/../")
|
||||
strCRLF = []byte("\r\n")
|
||||
strHTTP = []byte("http")
|
||||
strHTTP11 = []byte("HTTP/1.1")
|
||||
strColonSlashSlash = []byte("://")
|
||||
strColonSpace = []byte(": ")
|
||||
|
||||
strGet = []byte("GET")
|
||||
strHead = []byte("HEAD")
|
||||
strPost = []byte("POST")
|
||||
|
||||
strConnection = []byte("Connection")
|
||||
strContentLength = []byte("Content-Length")
|
||||
strContentType = []byte("Content-Type")
|
||||
strDate = []byte("Date")
|
||||
strHost = []byte("Host")
|
||||
strReferer = []byte("Referer")
|
||||
strServer = []byte("Server")
|
||||
strTransferEncoding = []byte("Transfer-Encoding")
|
||||
strUserAgent = []byte("User-Agent")
|
||||
|
||||
strClose = []byte("close")
|
||||
strChunked = []byte("chunked")
|
||||
strPostArgsContentType = []byte("application/x-www-form-urlencoded")
|
||||
)
|
||||
|
||||
// ResponseHeader represents HTTP response header.
|
||||
//
|
||||
// It is forbidden copying ResponseHeader instances.
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package fasthttp
|
||||
|
||||
var (
|
||||
defaultServerName = []byte("fasthttp server")
|
||||
defaultContentType = []byte("text/plain; charset=utf-8")
|
||||
)
|
||||
|
||||
var (
|
||||
strSlash = []byte("/")
|
||||
strSlashSlash = []byte("//")
|
||||
strSlashDotDot = []byte("/..")
|
||||
strSlashDotDotSlash = []byte("/../")
|
||||
strCRLF = []byte("\r\n")
|
||||
strHTTP = []byte("http")
|
||||
strHTTP11 = []byte("HTTP/1.1")
|
||||
strColonSlashSlash = []byte("://")
|
||||
strColonSpace = []byte(": ")
|
||||
|
||||
strGet = []byte("GET")
|
||||
strHead = []byte("HEAD")
|
||||
strPost = []byte("POST")
|
||||
|
||||
strConnection = []byte("Connection")
|
||||
strContentLength = []byte("Content-Length")
|
||||
strContentType = []byte("Content-Type")
|
||||
strDate = []byte("Date")
|
||||
strHost = []byte("Host")
|
||||
strReferer = []byte("Referer")
|
||||
strServer = []byte("Server")
|
||||
strTransferEncoding = []byte("Transfer-Encoding")
|
||||
strUserAgent = []byte("User-Agent")
|
||||
|
||||
strClose = []byte("close")
|
||||
strChunked = []byte("chunked")
|
||||
strPostArgsContentType = []byte("application/x-www-form-urlencoded")
|
||||
)
|
||||
Reference in New Issue
Block a user