You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
3.4 KiB

4 years ago
  1. """HTTP Headers constants."""
  2. # After changing the file content call ./tools/gen.py
  3. # to regenerate the headers parser
  4. from multidict import istr
  5. METH_ANY = '*'
  6. METH_CONNECT = 'CONNECT'
  7. METH_HEAD = 'HEAD'
  8. METH_GET = 'GET'
  9. METH_DELETE = 'DELETE'
  10. METH_OPTIONS = 'OPTIONS'
  11. METH_PATCH = 'PATCH'
  12. METH_POST = 'POST'
  13. METH_PUT = 'PUT'
  14. METH_TRACE = 'TRACE'
  15. METH_ALL = {METH_CONNECT, METH_HEAD, METH_GET, METH_DELETE,
  16. METH_OPTIONS, METH_PATCH, METH_POST, METH_PUT, METH_TRACE}
  17. ACCEPT = istr('Accept')
  18. ACCEPT_CHARSET = istr('Accept-Charset')
  19. ACCEPT_ENCODING = istr('Accept-Encoding')
  20. ACCEPT_LANGUAGE = istr('Accept-Language')
  21. ACCEPT_RANGES = istr('Accept-Ranges')
  22. ACCESS_CONTROL_MAX_AGE = istr('Access-Control-Max-Age')
  23. ACCESS_CONTROL_ALLOW_CREDENTIALS = istr('Access-Control-Allow-Credentials')
  24. ACCESS_CONTROL_ALLOW_HEADERS = istr('Access-Control-Allow-Headers')
  25. ACCESS_CONTROL_ALLOW_METHODS = istr('Access-Control-Allow-Methods')
  26. ACCESS_CONTROL_ALLOW_ORIGIN = istr('Access-Control-Allow-Origin')
  27. ACCESS_CONTROL_EXPOSE_HEADERS = istr('Access-Control-Expose-Headers')
  28. ACCESS_CONTROL_REQUEST_HEADERS = istr('Access-Control-Request-Headers')
  29. ACCESS_CONTROL_REQUEST_METHOD = istr('Access-Control-Request-Method')
  30. AGE = istr('Age')
  31. ALLOW = istr('Allow')
  32. AUTHORIZATION = istr('Authorization')
  33. CACHE_CONTROL = istr('Cache-Control')
  34. CONNECTION = istr('Connection')
  35. CONTENT_DISPOSITION = istr('Content-Disposition')
  36. CONTENT_ENCODING = istr('Content-Encoding')
  37. CONTENT_LANGUAGE = istr('Content-Language')
  38. CONTENT_LENGTH = istr('Content-Length')
  39. CONTENT_LOCATION = istr('Content-Location')
  40. CONTENT_MD5 = istr('Content-MD5')
  41. CONTENT_RANGE = istr('Content-Range')
  42. CONTENT_TRANSFER_ENCODING = istr('Content-Transfer-Encoding')
  43. CONTENT_TYPE = istr('Content-Type')
  44. COOKIE = istr('Cookie')
  45. DATE = istr('Date')
  46. DESTINATION = istr('Destination')
  47. DIGEST = istr('Digest')
  48. ETAG = istr('Etag')
  49. EXPECT = istr('Expect')
  50. EXPIRES = istr('Expires')
  51. FORWARDED = istr('Forwarded')
  52. FROM = istr('From')
  53. HOST = istr('Host')
  54. IF_MATCH = istr('If-Match')
  55. IF_MODIFIED_SINCE = istr('If-Modified-Since')
  56. IF_NONE_MATCH = istr('If-None-Match')
  57. IF_RANGE = istr('If-Range')
  58. IF_UNMODIFIED_SINCE = istr('If-Unmodified-Since')
  59. KEEP_ALIVE = istr('Keep-Alive')
  60. LAST_EVENT_ID = istr('Last-Event-ID')
  61. LAST_MODIFIED = istr('Last-Modified')
  62. LINK = istr('Link')
  63. LOCATION = istr('Location')
  64. MAX_FORWARDS = istr('Max-Forwards')
  65. ORIGIN = istr('Origin')
  66. PRAGMA = istr('Pragma')
  67. PROXY_AUTHENTICATE = istr('Proxy-Authenticate')
  68. PROXY_AUTHORIZATION = istr('Proxy-Authorization')
  69. RANGE = istr('Range')
  70. REFERER = istr('Referer')
  71. RETRY_AFTER = istr('Retry-After')
  72. SEC_WEBSOCKET_ACCEPT = istr('Sec-WebSocket-Accept')
  73. SEC_WEBSOCKET_VERSION = istr('Sec-WebSocket-Version')
  74. SEC_WEBSOCKET_PROTOCOL = istr('Sec-WebSocket-Protocol')
  75. SEC_WEBSOCKET_EXTENSIONS = istr('Sec-WebSocket-Extensions')
  76. SEC_WEBSOCKET_KEY = istr('Sec-WebSocket-Key')
  77. SEC_WEBSOCKET_KEY1 = istr('Sec-WebSocket-Key1')
  78. SERVER = istr('Server')
  79. SET_COOKIE = istr('Set-Cookie')
  80. TE = istr('TE')
  81. TRAILER = istr('Trailer')
  82. TRANSFER_ENCODING = istr('Transfer-Encoding')
  83. UPGRADE = istr('Upgrade')
  84. WEBSOCKET = istr('WebSocket')
  85. URI = istr('URI')
  86. USER_AGENT = istr('User-Agent')
  87. VARY = istr('Vary')
  88. VIA = istr('Via')
  89. WANT_DIGEST = istr('Want-Digest')
  90. WARNING = istr('Warning')
  91. WWW_AUTHENTICATE = istr('WWW-Authenticate')
  92. X_FORWARDED_FOR = istr('X-Forwarded-For')
  93. X_FORWARDED_HOST = istr('X-Forwarded-Host')
  94. X_FORWARDED_PROTO = istr('X-Forwarded-Proto')