strings.go 3.9 KB

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