strings.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. package fasthttp
  2. var (
  3. defaultServerName = "fasthttp"
  4. defaultUserAgent = "fasthttp"
  5. defaultContentType = []byte("text/plain; charset=utf-8")
  6. )
  7. var (
  8. strSlash = []byte("/")
  9. strSlashSlash = []byte("//")
  10. strSlashDotDot = []byte("/..")
  11. strSlashDotSlash = []byte("/./")
  12. strSlashDotDotSlash = []byte("/../")
  13. strBackSlashDotDot = []byte(`\..`)
  14. strBackSlashDotBackSlash = []byte(`\.\`)
  15. strSlashDotDotBackSlash = []byte(`/..\`)
  16. strBackSlashDotDotBackSlash = []byte(`\..\`)
  17. strCRLF = []byte("\r\n")
  18. strHTTP = []byte("http")
  19. strHTTPS = []byte("https")
  20. strHTTP11 = []byte("HTTP/1.1")
  21. strColon = []byte(":")
  22. strColonSlashSlash = []byte("://")
  23. strColonSpace = []byte(": ")
  24. strCommaSpace = []byte(", ")
  25. strGMT = []byte("GMT")
  26. strSpace = []byte(" ")
  27. strResponseContinue = []byte("HTTP/1.1 100 Continue\r\n\r\n")
  28. strEarlyHints = []byte("HTTP/1.1 103 Early Hints\r\n")
  29. strExpect = []byte(HeaderExpect)
  30. strConnection = []byte(HeaderConnection)
  31. strContentLength = []byte(HeaderContentLength)
  32. strContentType = []byte(HeaderContentType)
  33. strDate = []byte(HeaderDate)
  34. strHost = []byte(HeaderHost)
  35. strReferer = []byte(HeaderReferer)
  36. strServer = []byte(HeaderServer)
  37. strTransferEncoding = []byte(HeaderTransferEncoding)
  38. strContentEncoding = []byte(HeaderContentEncoding)
  39. strAcceptEncoding = []byte(HeaderAcceptEncoding)
  40. strUserAgent = []byte(HeaderUserAgent)
  41. strCookie = []byte(HeaderCookie)
  42. strSetCookie = []byte(HeaderSetCookie)
  43. strLocation = []byte(HeaderLocation)
  44. strIfModifiedSince = []byte(HeaderIfModifiedSince)
  45. strLastModified = []byte(HeaderLastModified)
  46. strAcceptRanges = []byte(HeaderAcceptRanges)
  47. strRange = []byte(HeaderRange)
  48. strContentRange = []byte(HeaderContentRange)
  49. strAuthorization = []byte(HeaderAuthorization)
  50. strTE = []byte(HeaderTE)
  51. strTrailer = []byte(HeaderTrailer)
  52. strMaxForwards = []byte(HeaderMaxForwards)
  53. strProxyConnection = []byte(HeaderProxyConnection)
  54. strProxyAuthenticate = []byte(HeaderProxyAuthenticate)
  55. strProxyAuthorization = []byte(HeaderProxyAuthorization)
  56. strWWWAuthenticate = []byte(HeaderWWWAuthenticate)
  57. strVary = []byte(HeaderVary)
  58. strCookieExpires = []byte("expires")
  59. strCookieDomain = []byte("domain")
  60. strCookiePath = []byte("path")
  61. strCookieHTTPOnly = []byte("HttpOnly")
  62. strCookieSecure = []byte("secure")
  63. strCookiePartitioned = []byte("Partitioned")
  64. strCookieMaxAge = []byte("max-age")
  65. strCookieSameSite = []byte("SameSite")
  66. strCookieSameSiteLax = []byte("Lax")
  67. strCookieSameSiteStrict = []byte("Strict")
  68. strCookieSameSiteNone = []byte("None")
  69. strClose = []byte("close")
  70. strGzip = []byte("gzip")
  71. strBr = []byte("br")
  72. strZstd = []byte("zstd")
  73. strDeflate = []byte("deflate")
  74. strKeepAlive = []byte("keep-alive")
  75. strUpgrade = []byte("Upgrade")
  76. strChunked = []byte("chunked")
  77. strIdentity = []byte("identity")
  78. str100Continue = []byte("100-continue")
  79. strPostArgsContentType = []byte("application/x-www-form-urlencoded")
  80. strDefaultContentType = []byte("application/octet-stream")
  81. strMultipartFormData = []byte("multipart/form-data")
  82. strBoundary = []byte("boundary")
  83. strBytes = []byte("bytes")
  84. strBasicSpace = []byte("Basic ")
  85. strLink = []byte("Link")
  86. strApplicationSlash = []byte("application/")
  87. strImageSVG = []byte("image/svg")
  88. strImageIcon = []byte("image/x-icon")
  89. strFontSlash = []byte("font/")
  90. strMultipartSlash = []byte("multipart/")
  91. strTextSlash = []byte("text/")
  92. )