strings.go 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. strResponseContinue = []byte("HTTP/1.1 100 Continue\r\n\r\n")
  27. strExpect = []byte(HeaderExpect)
  28. strConnection = []byte(HeaderConnection)
  29. strContentLength = []byte(HeaderContentLength)
  30. strContentType = []byte(HeaderContentType)
  31. strDate = []byte(HeaderDate)
  32. strHost = []byte(HeaderHost)
  33. strReferer = []byte(HeaderReferer)
  34. strServer = []byte(HeaderServer)
  35. strTransferEncoding = []byte(HeaderTransferEncoding)
  36. strContentEncoding = []byte(HeaderContentEncoding)
  37. strAcceptEncoding = []byte(HeaderAcceptEncoding)
  38. strUserAgent = []byte(HeaderUserAgent)
  39. strCookie = []byte(HeaderCookie)
  40. strSetCookie = []byte(HeaderSetCookie)
  41. strLocation = []byte(HeaderLocation)
  42. strIfModifiedSince = []byte(HeaderIfModifiedSince)
  43. strLastModified = []byte(HeaderLastModified)
  44. strAcceptRanges = []byte(HeaderAcceptRanges)
  45. strRange = []byte(HeaderRange)
  46. strContentRange = []byte(HeaderContentRange)
  47. strAuthorization = []byte(HeaderAuthorization)
  48. strTE = []byte(HeaderTE)
  49. strTrailer = []byte(HeaderTrailer)
  50. strMaxForwards = []byte(HeaderMaxForwards)
  51. strProxyConnection = []byte(HeaderProxyConnection)
  52. strProxyAuthenticate = []byte(HeaderProxyAuthenticate)
  53. strProxyAuthorization = []byte(HeaderProxyAuthorization)
  54. strWWWAuthenticate = []byte(HeaderWWWAuthenticate)
  55. strVary = []byte(HeaderVary)
  56. strCookieExpires = []byte("expires")
  57. strCookieDomain = []byte("domain")
  58. strCookiePath = []byte("path")
  59. strCookieHTTPOnly = []byte("HttpOnly")
  60. strCookieSecure = []byte("secure")
  61. strCookieMaxAge = []byte("max-age")
  62. strCookieSameSite = []byte("SameSite")
  63. strCookieSameSiteLax = []byte("Lax")
  64. strCookieSameSiteStrict = []byte("Strict")
  65. strCookieSameSiteNone = []byte("None")
  66. strClose = []byte("close")
  67. strGzip = []byte("gzip")
  68. strBr = []byte("br")
  69. strDeflate = []byte("deflate")
  70. strKeepAlive = []byte("keep-alive")
  71. strUpgrade = []byte("Upgrade")
  72. strChunked = []byte("chunked")
  73. strIdentity = []byte("identity")
  74. str100Continue = []byte("100-continue")
  75. strPostArgsContentType = []byte("application/x-www-form-urlencoded")
  76. strDefaultContentType = []byte("application/octet-stream")
  77. strMultipartFormData = []byte("multipart/form-data")
  78. strBoundary = []byte("boundary")
  79. strBytes = []byte("bytes")
  80. strBasicSpace = []byte("Basic ")
  81. strApplicationSlash = []byte("application/")
  82. strImageSVG = []byte("image/svg")
  83. strImageIcon = []byte("image/x-icon")
  84. strFontSlash = []byte("font/")
  85. strMultipartSlash = []byte("multipart/")
  86. strTextSlash = []byte("text/")
  87. )