-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Work on adapting istr * Fix response tests * Fix request tests * Fix proxy tests * Fix web exceptions tests * Fix server tests * Fix web response tests * Fix web request tests * Fix protocol tests * Fix multipart tests * Fix http parser tests * Fix helpers tests * Fix fuctional test * Don't perform extra conversions
- Loading branch information
Showing
19 changed files
with
205 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,91 @@ | ||
"""HTTP Headers constants.""" | ||
from multidict import upstr | ||
from multidict import istr | ||
|
||
METH_ANY = upstr('*') | ||
METH_CONNECT = upstr('CONNECT') | ||
METH_HEAD = upstr('HEAD') | ||
METH_GET = upstr('GET') | ||
METH_DELETE = upstr('DELETE') | ||
METH_OPTIONS = upstr('OPTIONS') | ||
METH_PATCH = upstr('PATCH') | ||
METH_POST = upstr('POST') | ||
METH_PUT = upstr('PUT') | ||
METH_TRACE = upstr('TRACE') | ||
METH_ANY = '*' | ||
METH_CONNECT = 'CONNECT' | ||
METH_HEAD = 'HEAD' | ||
METH_GET = 'GET' | ||
METH_DELETE = 'DELETE' | ||
METH_OPTIONS = 'OPTIONS' | ||
METH_PATCH = 'PATCH' | ||
METH_POST = 'POST' | ||
METH_PUT = 'PUT' | ||
METH_TRACE = 'TRACE' | ||
|
||
METH_ALL = {METH_CONNECT, METH_HEAD, METH_GET, METH_DELETE, | ||
METH_OPTIONS, METH_PATCH, METH_POST, METH_PUT, METH_TRACE} | ||
|
||
|
||
ACCEPT = upstr('ACCEPT') | ||
ACCEPT_CHARSET = upstr('ACCEPT-CHARSET') | ||
ACCEPT_ENCODING = upstr('ACCEPT-ENCODING') | ||
ACCEPT_LANGUAGE = upstr('ACCEPT-LANGUAGE') | ||
ACCEPT_RANGES = upstr('ACCEPT-RANGES') | ||
ACCESS_CONTROL_MAX_AGE = upstr('ACCESS-CONTROL-MAX-AGE') | ||
ACCESS_CONTROL_ALLOW_CREDENTIALS = upstr('ACCESS-CONTROL-ALLOW-CREDENTIALS') | ||
ACCESS_CONTROL_ALLOW_HEADERS = upstr('ACCESS-CONTROL-ALLOW-HEADERS') | ||
ACCESS_CONTROL_ALLOW_METHODS = upstr('ACCESS-CONTROL-ALLOW-METHODS') | ||
ACCESS_CONTROL_ALLOW_ORIGIN = upstr('ACCESS-CONTROL-ALLOW-ORIGIN') | ||
ACCESS_CONTROL_EXPOSE_HEADERS = upstr('ACCESS-CONTROL-EXPOSE-HEADERS') | ||
ACCESS_CONTROL_REQUEST_HEADERS = upstr('ACCESS-CONTROL-REQUEST-HEADERS') | ||
ACCESS_CONTROL_REQUEST_METHOD = upstr('ACCESS-CONTROL-REQUEST-METHOD') | ||
AGE = upstr('AGE') | ||
ALLOW = upstr('ALLOW') | ||
AUTHORIZATION = upstr('AUTHORIZATION') | ||
CACHE_CONTROL = upstr('CACHE-CONTROL') | ||
CONNECTION = upstr('CONNECTION') | ||
CONTENT_DISPOSITION = upstr('CONTENT-DISPOSITION') | ||
CONTENT_ENCODING = upstr('CONTENT-ENCODING') | ||
CONTENT_LANGUAGE = upstr('CONTENT-LANGUAGE') | ||
CONTENT_LENGTH = upstr('CONTENT-LENGTH') | ||
CONTENT_LOCATION = upstr('CONTENT-LOCATION') | ||
CONTENT_MD5 = upstr('CONTENT-MD5') | ||
CONTENT_RANGE = upstr('CONTENT-RANGE') | ||
CONTENT_TRANSFER_ENCODING = upstr('CONTENT-TRANSFER-ENCODING') | ||
CONTENT_TYPE = upstr('CONTENT-TYPE') | ||
COOKIE = upstr('COOKIE') | ||
DATE = upstr('DATE') | ||
DESTINATION = upstr('DESTINATION') | ||
DIGEST = upstr('DIGEST') | ||
ETAG = upstr('ETAG') | ||
EXPECT = upstr('EXPECT') | ||
EXPIRES = upstr('EXPIRES') | ||
FROM = upstr('FROM') | ||
HOST = upstr('HOST') | ||
IF_MATCH = upstr('IF-MATCH') | ||
IF_MODIFIED_SINCE = upstr('IF-MODIFIED-SINCE') | ||
IF_NONE_MATCH = upstr('IF-NONE-MATCH') | ||
IF_RANGE = upstr('IF-RANGE') | ||
IF_UNMODIFIED_SINCE = upstr('IF-UNMODIFIED-SINCE') | ||
KEEP_ALIVE = upstr('KEEP-ALIVE') | ||
LAST_EVENT_ID = upstr('LAST-EVENT-ID') | ||
LAST_MODIFIED = upstr('LAST-MODIFIED') | ||
LINK = upstr('LINK') | ||
LOCATION = upstr('LOCATION') | ||
MAX_FORWARDS = upstr('MAX-FORWARDS') | ||
ORIGIN = upstr('ORIGIN') | ||
PRAGMA = upstr('PRAGMA') | ||
PROXY_AUTHENTICATE = upstr('PROXY_AUTHENTICATE') | ||
PROXY_AUTHORIZATION = upstr('PROXY-AUTHORIZATION') | ||
RANGE = upstr('RANGE') | ||
REFERER = upstr('REFERER') | ||
RETRY_AFTER = upstr('RETRY-AFTER') | ||
SEC_WEBSOCKET_ACCEPT = upstr('SEC-WEBSOCKET-ACCEPT') | ||
SEC_WEBSOCKET_VERSION = upstr('SEC-WEBSOCKET-VERSION') | ||
SEC_WEBSOCKET_PROTOCOL = upstr('SEC-WEBSOCKET-PROTOCOL') | ||
SEC_WEBSOCKET_KEY = upstr('SEC-WEBSOCKET-KEY') | ||
SEC_WEBSOCKET_KEY1 = upstr('SEC-WEBSOCKET-KEY1') | ||
SERVER = upstr('SERVER') | ||
SET_COOKIE = upstr('SET-COOKIE') | ||
TE = upstr('TE') | ||
TRAILER = upstr('TRAILER') | ||
TRANSFER_ENCODING = upstr('TRANSFER-ENCODING') | ||
UPGRADE = upstr('UPGRADE') | ||
WEBSOCKET = upstr('WEBSOCKET') | ||
URI = upstr('URI') | ||
USER_AGENT = upstr('USER-AGENT') | ||
VARY = upstr('VARY') | ||
VIA = upstr('VIA') | ||
WANT_DIGEST = upstr('WANT-DIGEST') | ||
WARNING = upstr('WARNING') | ||
WWW_AUTHENTICATE = upstr('WWW-AUTHENTICATE') | ||
ACCEPT = istr('ACCEPT') | ||
ACCEPT_CHARSET = istr('ACCEPT-CHARSET') | ||
ACCEPT_ENCODING = istr('ACCEPT-ENCODING') | ||
ACCEPT_LANGUAGE = istr('ACCEPT-LANGUAGE') | ||
ACCEPT_RANGES = istr('ACCEPT-RANGES') | ||
ACCESS_CONTROL_MAX_AGE = istr('ACCESS-CONTROL-MAX-AGE') | ||
ACCESS_CONTROL_ALLOW_CREDENTIALS = istr('ACCESS-CONTROL-ALLOW-CREDENTIALS') | ||
ACCESS_CONTROL_ALLOW_HEADERS = istr('ACCESS-CONTROL-ALLOW-HEADERS') | ||
ACCESS_CONTROL_ALLOW_METHODS = istr('ACCESS-CONTROL-ALLOW-METHODS') | ||
ACCESS_CONTROL_ALLOW_ORIGIN = istr('ACCESS-CONTROL-ALLOW-ORIGIN') | ||
ACCESS_CONTROL_EXPOSE_HEADERS = istr('ACCESS-CONTROL-EXPOSE-HEADERS') | ||
ACCESS_CONTROL_REQUEST_HEADERS = istr('ACCESS-CONTROL-REQUEST-HEADERS') | ||
ACCESS_CONTROL_REQUEST_METHOD = istr('ACCESS-CONTROL-REQUEST-METHOD') | ||
AGE = istr('AGE') | ||
ALLOW = istr('ALLOW') | ||
AUTHORIZATION = istr('AUTHORIZATION') | ||
CACHE_CONTROL = istr('CACHE-CONTROL') | ||
CONNECTION = istr('CONNECTION') | ||
CONTENT_DISPOSITION = istr('CONTENT-DISPOSITION') | ||
CONTENT_ENCODING = istr('CONTENT-ENCODING') | ||
CONTENT_LANGUAGE = istr('CONTENT-LANGUAGE') | ||
CONTENT_LENGTH = istr('CONTENT-LENGTH') | ||
CONTENT_LOCATION = istr('CONTENT-LOCATION') | ||
CONTENT_MD5 = istr('CONTENT-MD5') | ||
CONTENT_RANGE = istr('CONTENT-RANGE') | ||
CONTENT_TRANSFER_ENCODING = istr('CONTENT-TRANSFER-ENCODING') | ||
CONTENT_TYPE = istr('CONTENT-TYPE') | ||
COOKIE = istr('COOKIE') | ||
DATE = istr('DATE') | ||
DESTINATION = istr('DESTINATION') | ||
DIGEST = istr('DIGEST') | ||
ETAG = istr('ETAG') | ||
EXPECT = istr('EXPECT') | ||
EXPIRES = istr('EXPIRES') | ||
FROM = istr('FROM') | ||
HOST = istr('HOST') | ||
IF_MATCH = istr('IF-MATCH') | ||
IF_MODIFIED_SINCE = istr('IF-MODIFIED-SINCE') | ||
IF_NONE_MATCH = istr('IF-NONE-MATCH') | ||
IF_RANGE = istr('IF-RANGE') | ||
IF_UNMODIFIED_SINCE = istr('IF-UNMODIFIED-SINCE') | ||
KEEP_ALIVE = istr('KEEP-ALIVE') | ||
LAST_EVENT_ID = istr('LAST-EVENT-ID') | ||
LAST_MODIFIED = istr('LAST-MODIFIED') | ||
LINK = istr('LINK') | ||
LOCATION = istr('LOCATION') | ||
MAX_FORWARDS = istr('MAX-FORWARDS') | ||
ORIGIN = istr('ORIGIN') | ||
PRAGMA = istr('PRAGMA') | ||
PROXY_AUTHENTICATE = istr('PROXY_AUTHENTICATE') | ||
PROXY_AUTHORIZATION = istr('PROXY-AUTHORIZATION') | ||
RANGE = istr('RANGE') | ||
REFERER = istr('REFERER') | ||
RETRY_AFTER = istr('RETRY-AFTER') | ||
SEC_WEBSOCKET_ACCEPT = istr('SEC-WEBSOCKET-ACCEPT') | ||
SEC_WEBSOCKET_VERSION = istr('SEC-WEBSOCKET-VERSION') | ||
SEC_WEBSOCKET_PROTOCOL = istr('SEC-WEBSOCKET-PROTOCOL') | ||
SEC_WEBSOCKET_KEY = istr('SEC-WEBSOCKET-KEY') | ||
SEC_WEBSOCKET_KEY1 = istr('SEC-WEBSOCKET-KEY1') | ||
SERVER = istr('SERVER') | ||
SET_COOKIE = istr('SET-COOKIE') | ||
TE = istr('TE') | ||
TRAILER = istr('TRAILER') | ||
TRANSFER_ENCODING = istr('TRANSFER-ENCODING') | ||
UPGRADE = istr('UPGRADE') | ||
WEBSOCKET = istr('WEBSOCKET') | ||
URI = istr('URI') | ||
USER_AGENT = istr('USER-AGENT') | ||
VARY = istr('VARY') | ||
VIA = istr('VIA') | ||
WANT_DIGEST = istr('WANT-DIGEST') | ||
WARNING = istr('WARNING') | ||
WWW_AUTHENTICATE = istr('WWW-AUTHENTICATE') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.