eventlet.green.http package

Submodules

eventlet.green.http.client module

HTTP/1.1 client library

<intro stuff goes here> <other stuff, too>

HTTPConnection goes through a number of "states", which define when a client may legally make another request or fetch the response for a particular request. This diagram details these state transitions:

(null)

HTTPConnection()

v

Idle

putrequest()

v

Request-started

( putheader() )* endheaders()

v

Request-sent

|_____________________________ | | getresponse() raises | response = getresponse() | ConnectionError v v

Unread-response Idle [Response-headers-read]

|____________________ | | | response.read() | putrequest() v v

Idle Req-started-unread-response

______/|

/ |

response.read() | | ( putheader() )* endheaders()

v v

Request-started Req-sent-unread-response

response.read()

v

Request-sent

This diagram presents the following rules:

-- a second request may not be started until {response-headers-read} -- a response [object] cannot be retrieved until {request-sent} -- there is no differentiation between an unread response body and a

partially read response body

Note: this enforcement is applied by the HTTPConnection class. The

HTTPResponse class does not enforce this state machine, which implies sophisticated clients may accelerate the request/response pipeline. Caution should be taken, though: accelerating the states beyond the above pattern may imply knowledge of the server's connection-close behavior for certain requests. For example, it is impossible to tell whether the server will close the connection UNTIL the response headers have been read; this means that further requests cannot be placed into the pipeline until it is known that the server will NOT be closing the connection.

Logical State __state __response ------------- ------- ---------- Idle _CS_IDLE None Request-started _CS_REQ_STARTED None Request-sent _CS_REQ_SENT None Unread-response _CS_IDLE <response_class> Req-started-unread-response _CS_REQ_STARTED <response_class> Req-sent-unread-response _CS_REQ_SENT <response_class>

exception eventlet.green.http.client.BadStatusLine(line)

基类:HTTPException

exception eventlet.green.http.client.CannotSendHeader

基类:ImproperConnectionState

exception eventlet.green.http.client.CannotSendRequest

基类:ImproperConnectionState

class eventlet.green.http.client.HTTPConnection(host, port=None, timeout=<object object>, source_address=None)

基类:object

auto_open = 1
close()

Close the connection to the HTTP server.

connect()

Connect to the host and port specified in __init__.

debuglevel = 0
default_port = 80
endheaders(message_body=None, **kwds)

Indicate that the last header line has been sent to the server.

This method sends the request to the server. The optional message_body argument can be used to pass a message body associated with the request.

getresponse()

Get the response from the server.

If the HTTPConnection is in the correct state, returns an instance of HTTPResponse or of whatever object is returned by the response_class variable.

If a request has not been sent or if a previous response has not be handled, ResponseNotReady is raised. If the HTTP response indicates that the connection should be closed, then it will be closed before the response is returned. When the connection is closed, the underlying socket is closed.

putheader(header, *values)

Send a request header line to the server.

For example: h.putheader('Accept', 'text/html')

putrequest(method, url, skip_host=0, skip_accept_encoding=0)

Send a request to the server.

`method' specifies an HTTP request method, e.g. 'GET'. `url' specifies the object being requested, e.g. '/index.html'. `skip_host' if True does not add automatically a 'Host:' header `skip_accept_encoding' if True does not add automatically an

'Accept-Encoding:' header

request(method, url, body=None, headers={}, **kwds)

Send a complete request to the server.

response_class

HTTPResponse 的别名

send(data)

Send data' to the server. ``data` can be a string object, a bytes object, an array object, a file-like object that supports a .read() method, or an iterable object.

set_debuglevel(level)
set_tunnel(host, port=None, headers=None)

Set up host and port for HTTP CONNECT tunnelling.

In a connection that uses HTTP CONNECT tunneling, the host passed to the constructor is used as a proxy server that relays all communication to the endpoint passed to set_tunnel. This done by sending an HTTP CONNECT request to the proxy server when the connection is established.

This method must be called before the HTML connection has been established.

The headers argument should be a mapping of extra HTTP headers to send with the CONNECT request.

exception eventlet.green.http.client.HTTPException

基类:Exception

class eventlet.green.http.client.HTTPResponse(sock, debuglevel=0, method=None, url=None)

基类:BufferedIOBase

begin()
close()

Flush and close the IO object.

This method has no effect if the file is already closed.

fileno()

Return underlying file descriptor if one exists.

Raise OSError if the IO object does not use a file descriptor.

flush()

Flush write buffers, if applicable.

This is not implemented for read-only and non-blocking streams.

getcode()

Return the HTTP status code that was sent with the response, or None if the URL is not an HTTP URL.

getheader(name, default=None)

Returns the value of the header matching name.

If there are multiple matching headers, the values are combined into a single string separated by commas and spaces.

If no matching header is found, returns default or None if the default is not specified.

If the headers are unknown, raises http.client.ResponseNotReady.

getheaders()

Return list of (header, value) tuples.

geturl()

Return the real URL of the page.

In some cases, the HTTP server redirects a client to another URL. The urlopen() function handles this transparently, but in some cases the caller needs to know which URL the client was redirected to. The geturl() method can be used to get at this redirected URL.

info()

Returns an instance of the class mimetools.Message containing meta-information associated with the URL.

When the method is HTTP, these headers are those returned by the server at the head of the retrieved HTML page (including Content-Length and Content-Type).

When the method is FTP, a Content-Length header will be present if (as is now usual) the server passed back a file length in response to the FTP retrieval request. A Content-Type header will be present if the MIME type can be guessed.

When the method is local-file, returned headers will include a Date representing the file's last-modified time, a Content-Length giving file size, and a Content-Type containing a guess at the file's type. See also the description of the mimetools module.

isclosed()

True if the connection is closed.

peek(n=-1)
read(amt=None)

Read and return up to n bytes.

If the size argument is omitted, None, or negative, read and return all data until EOF.

If the size argument is positive, and the underlying raw stream is not 'interactive', multiple raw reads may be issued to satisfy the byte count (unless EOF is reached first). However, for interactive raw streams (as well as sockets and pipes), at most one raw read will be issued, and a short result does not imply that EOF is imminent.

Return an empty bytes object on EOF.

Return None if the underlying raw stream was open in non-blocking mode and no data is available at the moment.

read1(n=-1)

Read with at most one underlying system call. If at least one byte is buffered, return that instead.

readable()

Always returns True

readinto(b)

Read up to len(b) bytes into bytearray b and return the number of bytes read.

readline(limit=-1)

Read and return a line from the stream.

If size is specified, at most size bytes will be read.

The line terminator is always b'n' for binary files; for text files, the newlines argument to open can be used to select the line terminator(s) recognized.

class eventlet.green.http.client.HTTPSConnection(host, port=None, key_file=None, cert_file=None, timeout=<object object>, source_address=None, *, context=None, check_hostname=None)

基类:HTTPConnection

This class allows communication via SSL.

connect()

Connect to a host on a given (SSL) port.

default_port = 443
exception eventlet.green.http.client.ImproperConnectionState

基类:HTTPException

exception eventlet.green.http.client.IncompleteRead(partial, expected=None)

基类:HTTPException

exception eventlet.green.http.client.InvalidURL

基类:HTTPException

exception eventlet.green.http.client.LineTooLong(line_type)

基类:HTTPException

exception eventlet.green.http.client.NotConnected

基类:HTTPException

exception eventlet.green.http.client.RemoteDisconnected(*pos, **kw)

基类:ConnectionResetError, BadStatusLine

exception eventlet.green.http.client.ResponseNotReady

基类:ImproperConnectionState

exception eventlet.green.http.client.UnimplementedFileMode

基类:HTTPException

exception eventlet.green.http.client.UnknownProtocol(version)

基类:HTTPException

exception eventlet.green.http.client.UnknownTransferEncoding

基类:HTTPException

eventlet.green.http.client.error

HTTPException 的别名

eventlet.green.http.cookiejar module

HTTP cookie handling for web clients.

This module has (now fairly distant) origins in Gisle Aas' Perl module HTTP::Cookies, from the libwww-perl library.

Docstrings, comments and debug strings in this code refer to the attributes of the HTTP cookie system as cookie-attributes, to distinguish them clearly from Python attributes.

Class diagram (note that BSDDBCookieJar and the MSIE* classes are not distributed with the Python standard library, but are available from http://wwwsearch.sf.net/):

CookieJar____ /

FileCookieJar

/ |

MozillaCookieJar | LWPCookieJar
|
---MSIEBase |
/ | |
/ MSIEDBCookieJar BSDDBCookieJar

|/

MSIECookieJar

class eventlet.green.http.cookiejar.Cookie(version, name, value, port, port_specified, domain, domain_specified, domain_initial_dot, path, path_specified, secure, expires, discard, comment, comment_url, rest, rfc2109=False)

基类:object

HTTP Cookie.

This class represents both Netscape and RFC 2965 cookies.

This is deliberately a very simple class. It just holds attributes. It's possible to construct Cookie instances that don't comply with the cookie standards. CookieJar.make_cookies is the factory function for Cookie objects -- it deals with cookie parsing, supplying defaults, and normalising to the representation used in this class. CookiePolicy is responsible for checking them to see whether they should be accepted from and returned to the server.

Note that the port may be present in the headers, but unspecified ("Port" rather than"Port=80", for example); if this is the case, port is None.

get_nonstandard_attr(name, default=None)
has_nonstandard_attr(name)
is_expired(now=None)
set_nonstandard_attr(name, value)
class eventlet.green.http.cookiejar.CookieJar(policy=None)

基类:object

Collection of HTTP cookies.

You may not need to know about this class: try urllib.request.build_opener(HTTPCookieProcessor).open(url).

Add correct Cookie: header to request (urllib.request.Request object).

The Cookie2 header is also added unless policy.hide_cookie2 is true.

clear(domain=None, path=None, name=None)

Clear some cookies.

Invoking this method without arguments will clear all cookies. If given a single argument, only cookies belonging to that domain will be removed. If given two arguments, cookies belonging to the specified path within that domain are removed. If given three arguments, then the cookie with the specified name, path and domain is removed.

Raises KeyError if no matching cookie exists.

clear_expired_cookies()

Discard all expired cookies.

You probably don't need to call this method: expired cookies are never sent back to the server (provided you're using DefaultCookiePolicy), this method is called by CookieJar itself every so often, and the .save() method won't save expired cookies anyway (unless you ask otherwise by passing a true ignore_expires argument).

clear_session_cookies()

Discard all session cookies.

Note that the .save() method won't save session cookies anyway, unless you ask otherwise by passing a true ignore_discard argument.

domain_re = re.compile('[^.]*')
dots_re = re.compile('^\\.+')
extract_cookies(response, request)

Extract cookies from response, where allowable given the request.

magic_re = re.compile('^\\#LWP-Cookies-(\\d+\\.\\d+)', re.ASCII)
make_cookies(response, request)

Return sequence of Cookie objects extracted from response object.

non_word_re = re.compile('\\W')
quote_re = re.compile('([\\"\\\\])')

Set a cookie, without checking whether or not it should be set.

Set a cookie if policy says it's OK to do so.

set_policy(policy)
strict_domain_re = re.compile('\\.?[^.]*')
class eventlet.green.http.cookiejar.CookiePolicy

基类:object

Defines which cookies get accepted from and returned to server.

May also modify cookies, though this is probably a bad idea.

The subclass DefaultCookiePolicy defines the standard rules for Netscape and RFC 2965 cookies -- override that if you want a customised policy.

domain_return_ok(domain, request)

Return false if cookies should not be returned, given cookie domain.

path_return_ok(path, request)

Return false if cookies should not be returned, given cookie path.

return_ok(cookie, request)

Return true if (and only if) cookie should be returned to server.

set_ok(cookie, request)

Return true if (and only if) cookie should be accepted from server.

Currently, pre-expired cookies never get this far -- the CookieJar class deletes such cookies itself.

class eventlet.green.http.cookiejar.DefaultCookiePolicy(blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False, rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False, strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False, strict_ns_domain=0, strict_ns_set_initial_dollar=False, strict_ns_set_path=False)

基类:CookiePolicy

Implements the standard rules for accepting and returning cookies.

DomainLiberal = 0
DomainRFC2965Match = 4
DomainStrict = 3
DomainStrictNoDots = 1
DomainStrictNonDomain = 2
allowed_domains()

Return None, or the sequence of allowed domains (as a tuple).

blocked_domains()

Return the sequence of blocked domains (as a tuple).

domain_return_ok(domain, request)

Return false if cookies should not be returned, given cookie domain.

is_blocked(domain)
is_not_allowed(domain)
path_return_ok(path, request)

Return false if cookies should not be returned, given cookie path.

return_ok(cookie, request)

If you override .return_ok(), be sure to call this method. If it returns false, so should your subclass (assuming your subclass wants to be more strict about which cookies to return).

return_ok_domain(cookie, request)
return_ok_expires(cookie, request)
return_ok_port(cookie, request)
return_ok_secure(cookie, request)
return_ok_verifiability(cookie, request)
return_ok_version(cookie, request)
set_allowed_domains(allowed_domains)

Set the sequence of allowed domains, or None.

set_blocked_domains(blocked_domains)

Set the sequence of blocked domains.

set_ok(cookie, request)

If you override .set_ok(), be sure to call this method. If it returns false, so should your subclass (assuming your subclass wants to be more strict about which cookies to accept).

set_ok_domain(cookie, request)
set_ok_name(cookie, request)
set_ok_path(cookie, request)
set_ok_port(cookie, request)
set_ok_verifiability(cookie, request)
set_ok_version(cookie, request)
class eventlet.green.http.cookiejar.FileCookieJar(filename=None, delayload=False, policy=None)

基类:CookieJar

CookieJar that can be loaded from and saved to a file.

load(filename=None, ignore_discard=False, ignore_expires=False)

Load cookies from a file.

revert(filename=None, ignore_discard=False, ignore_expires=False)

Clear all cookies and reload cookies from a saved file.

Raises LoadError (or OSError) if reversion is not successful; the object's state will not be altered if this happens.

save(filename=None, ignore_discard=False, ignore_expires=False)

Save cookies to a file.

class eventlet.green.http.cookiejar.LWPCookieJar(filename=None, delayload=False, policy=None)

基类:FileCookieJar

The LWPCookieJar saves a sequence of "Set-Cookie3" lines. "Set-Cookie3" is the format used by the libwww-perl library, not known to be compatible with any browser, but which is easy to read and doesn't lose information about RFC 2965 cookies.

Additional methods

as_lwp_str(ignore_discard=True, ignore_expired=True)

as_lwp_str(ignore_discard=True, ignore_expires=True)

Return cookies as a string of "n"-separated "Set-Cookie3" headers.

ignore_discard and ignore_expires: see docstring for FileCookieJar.save

save(filename=None, ignore_discard=False, ignore_expires=False)

Save cookies to a file.

exception eventlet.green.http.cookiejar.LoadError

基类:OSError

class eventlet.green.http.cookiejar.MozillaCookieJar(filename=None, delayload=False, policy=None)

基类:FileCookieJar

WARNING: you may want to backup your browser's cookies file if you use this class to save cookies. I think it works, but there have been bugs in the past!

This class differs from CookieJar only in the format it uses to save and load cookies to and from a file. This class uses the Mozilla/Netscape `cookies.txt' format. lynx uses this file format, too.

Don't expect cookies saved while the browser is running to be noticed by the browser (in fact, Mozilla on unix will overwrite your saved cookies if you change them on disk while it's running; on Windows, you probably can't save at all while the browser is running).

Note that the Mozilla/Netscape format will downgrade RFC2965 cookies to Netscape cookies on saving.

In particular, the cookie version and port number information is lost, together with information about whether or not Path, Port and Discard were specified by the Set-Cookie2 (or Set-Cookie) header, and whether or not the domain as set in the HTTP header started with a dot (yes, I'm aware some domains in Netscape files start with a dot and some don't -- trust me, you really don't want to know any more about this).

Note that though Mozilla and Netscape use the same format, they use slightly different headers. The class saves cookies using the Netscape header by default (Mozilla can cope with that).

header = '# Netscape HTTP Cookie File\n# http://curl.haxx.se/rfc/cookie_spec.html\n# This is a generated file!  Do not edit.\n\n'
magic_re = re.compile('#( Netscape)? HTTP Cookie File')
save(filename=None, ignore_discard=False, ignore_expires=False)

Save cookies to a file.

eventlet.green.http.cookies module

eventlet.green.http.server module

HTTP server classes.

Note: BaseHTTPRequestHandler doesn't implement any HTTP request; see SimpleHTTPRequestHandler for simple implementations of GET, HEAD and POST, and CGIHTTPRequestHandler for CGI scripts.

It does, however, optionally implement HTTP/1.1 persistent connections, as of version 0.3.

Notes on CGIHTTPRequestHandler

This class implements GET and POST requests to cgi-bin scripts.

If the os.fork() function is not present (e.g. on Windows), subprocess.Popen() is used as a fallback, with slightly altered semantics.

In all cases, the implementation is intentionally naive -- all requests are executed synchronously.

SECURITY WARNING: DON'T USE THIS CODE UNLESS YOU ARE INSIDE A FIREWALL -- it may execute arbitrary Python code or external programs.

Note that status code 200 is sent prior to execution of a CGI script, so scripts cannot send other status codes such as 302 (redirect).

XXX To do:

  • log requests even later (to capture byte count)

  • log user-agent header and other interesting goodies

  • send error log to separate file

class eventlet.green.http.server.BaseHTTPRequestHandler(request, client_address, server)

基类:StreamRequestHandler

HTTP request handler base class.

The following explanation of HTTP serves to guide you through the code as well as to expose any misunderstandings I may have about HTTP (so you don't need to read the code to figure out I'm wrong :-).

HTTP (HyperText Transfer Protocol) is an extensible protocol on top of a reliable stream transport (e.g. TCP/IP). The protocol recognizes three parts to a request:

  1. One line identifying the request type and path

  2. An optional set of RFC-822-style headers

  3. An optional data part

The headers and data are separated by a blank line.

The first line of the request has the form

<command> <path> <version>

where <command> is a (case-sensitive) keyword such as GET or POST, <path> is a string containing path information for the request, and <version> should be the string "HTTP/1.0" or "HTTP/1.1". <path> is encoded using the URL encoding scheme (using %xx to signify the ASCII character with hex code xx).

The specification specifies that lines are separated by CRLF but for compatibility with the widest range of clients recommends servers also handle LF. Similarly, whitespace in the request line is treated sensibly (allowing multiple spaces between components and allowing trailing whitespace).

Similarly, for output, lines ought to be separated by CRLF pairs but most clients grok LF characters just fine.

If the first line of the request has the form

<command> <path>

(i.e. <version> is left out) then this is assumed to be an HTTP 0.9 request; this form has no optional headers and data part and the reply consists of just the data.

The reply form of the HTTP 1.x protocol again has three parts:

  1. One line giving the response code

  2. An optional set of RFC-822-style headers

  3. The data

Again, the headers and data are separated by a blank line.

The response code line has the form

<version> <responsecode> <responsestring>

where <version> is the protocol version ("HTTP/1.0" or "HTTP/1.1"), <responsecode> is a 3-digit response code indicating success or failure of the request, and <responsestring> is an optional human-readable string explaining what the response code means.

This server parses the request and the headers, and then calls a function specific to the request type (<command>). Specifically, a request SPAM will be handled by a method do_SPAM(). If no such method exists the server sends an error response to the client. If it exists, it is called with no arguments:

do_SPAM()

Note that the request name is case sensitive (i.e. SPAM and spam are different requests).

The various request details are stored in instance variables:

  • client_address is the client IP address in the form (host,

port);

  • command, path and version are the broken-down request line;

  • headers is an instance of email.message.Message (or a derived

class) containing the header information;

  • rfile is a file object open for reading positioned at the

start of the optional input data part;

  • wfile is a file object open for writing.

IT IS IMPORTANT TO ADHERE TO THE PROTOCOL FOR WRITING!

The first thing to be written must be the response line. Then follow 0 or more header lines, then a blank line, and then the actual data (if any). The meaning of the header lines depends on the command executed by the server; in most cases, when data is returned, there should be at least one header line of the form

Content-type: <type>/<subtype>

where <type> and <subtype> should be registered MIME types, e.g. "text/html" or "text/plain".

MessageClass

HTTPMessage 的别名

address_string()

Return the client address.

date_time_string(timestamp=None)

Return the current date and time formatted for a message header.

default_request_version = 'HTTP/0.9'
end_headers()

Send the blank line ending the MIME headers.

error_content_type = 'text/html;charset=utf-8'
error_message_format = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n        "http://www.w3.org/TR/html4/strict.dtd">\n<html>\n    <head>\n        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\n        <title>Error response</title>\n    </head>\n    <body>\n        <h1>Error response</h1>\n        <p>Error code: %(code)d</p>\n        <p>Message: %(message)s.</p>\n        <p>Error code explanation: %(code)s - %(explain)s.</p>\n    </body>\n</html>\n'
flush_headers()
handle()

Handle multiple requests if necessary.

handle_expect_100()

Decide what to do with an "Expect: 100-continue" header.

If the client is expecting a 100 Continue response, we must respond with either a 100 Continue or a final response before waiting for the request body. The default is to always respond with a 100 Continue. You can behave differently (for example, reject unauthorized requests) by overriding this method.

This method should either return True (possibly after sending a 100 Continue response) or send an error response and return False.

handle_one_request()

Handle a single HTTP request.

You normally don't need to override this method; see the class __doc__ string for information on how to handle specific HTTP commands such as GET and POST.

log_date_time_string()

Return the current time formatted for logging.

log_error(format, *args)

Log an error.

This is called when a request cannot be fulfilled. By default it passes the message on to log_message().

Arguments are the same as for log_message().

XXX This should go to the separate error log.

log_message(format, *args)

Log an arbitrary message.

This is used by all other logging functions. Override it if you have specific logging wishes.

The first argument, FORMAT, is a format string for the message to be logged. If the format string contains any % escapes requiring parameters, they should be specified as subsequent arguments (it's just like printf!).

The client ip and current date/time are prefixed to every message.

log_request(code='-', size='-')

Log an accepted request.

This is called by send_response().

monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
parse_request()

Parse a request (internal).

The request should be stored in self.raw_requestline; the results are in self.command, self.path, self.request_version and self.headers.

Return True for success, False for failure; on failure, an error is sent back.

protocol_version = 'HTTP/1.0'
responses = {HTTPStatus.CONTINUE: ('Continue', 'Request received, please continue'), HTTPStatus.SWITCHING_PROTOCOLS: ('Switching Protocols', 'Switching to new protocol; obey Upgrade header'), HTTPStatus.PROCESSING: ('Processing', ''), HTTPStatus.OK: ('OK', 'Request fulfilled, document follows'), HTTPStatus.CREATED: ('Created', 'Document created, URL follows'), HTTPStatus.ACCEPTED: ('Accepted', 'Request accepted, processing continues off-line'), HTTPStatus.NON_AUTHORITATIVE_INFORMATION: ('Non-Authoritative Information', 'Request fulfilled from cache'), HTTPStatus.NO_CONTENT: ('No Content', 'Request fulfilled, nothing follows'), HTTPStatus.RESET_CONTENT: ('Reset Content', 'Clear input form for further input'), HTTPStatus.PARTIAL_CONTENT: ('Partial Content', 'Partial content follows'), HTTPStatus.MULTI_STATUS: ('Multi-Status', ''), HTTPStatus.ALREADY_REPORTED: ('Already Reported', ''), HTTPStatus.IM_USED: ('IM Used', ''), HTTPStatus.MULTIPLE_CHOICES: ('Multiple Choices', 'Object has several resources -- see URI list'), HTTPStatus.MOVED_PERMANENTLY: ('Moved Permanently', 'Object moved permanently -- see URI list'), HTTPStatus.FOUND: ('Found', 'Object moved temporarily -- see URI list'), HTTPStatus.SEE_OTHER: ('See Other', 'Object moved -- see Method and URL list'), HTTPStatus.NOT_MODIFIED: ('Not Modified', 'Document has not changed since given time'), HTTPStatus.USE_PROXY: ('Use Proxy', 'You must use proxy specified in Location to access this resource'), HTTPStatus.TEMPORARY_REDIRECT: ('Temporary Redirect', 'Object moved temporarily -- see URI list'), HTTPStatus.PERMANENT_REDIRECT: ('Permanent Redirect', 'Object moved temporarily -- see URI list'), HTTPStatus.BAD_REQUEST: ('Bad Request', 'Bad request syntax or unsupported method'), HTTPStatus.UNAUTHORIZED: ('Unauthorized', 'No permission -- see authorization schemes'), HTTPStatus.PAYMENT_REQUIRED: ('Payment Required', 'No payment -- see charging schemes'), HTTPStatus.FORBIDDEN: ('Forbidden', 'Request forbidden -- authorization will not help'), HTTPStatus.NOT_FOUND: ('Not Found', 'Nothing matches the given URI'), HTTPStatus.METHOD_NOT_ALLOWED: ('Method Not Allowed', 'Specified method is invalid for this resource'), HTTPStatus.NOT_ACCEPTABLE: ('Not Acceptable', 'URI not available in preferred format'), HTTPStatus.PROXY_AUTHENTICATION_REQUIRED: ('Proxy Authentication Required', 'You must authenticate with this proxy before proceeding'), HTTPStatus.REQUEST_TIMEOUT: ('Request Timeout', 'Request timed out; try again later'), HTTPStatus.CONFLICT: ('Conflict', 'Request conflict'), HTTPStatus.GONE: ('Gone', 'URI no longer exists and has been permanently removed'), HTTPStatus.LENGTH_REQUIRED: ('Length Required', 'Client must specify Content-Length'), HTTPStatus.PRECONDITION_FAILED: ('Precondition Failed', 'Precondition in headers is false'), HTTPStatus.REQUEST_ENTITY_TOO_LARGE: ('Request Entity Too Large', 'Entity is too large'), HTTPStatus.REQUEST_URI_TOO_LONG: ('Request-URI Too Long', 'URI is too long'), HTTPStatus.UNSUPPORTED_MEDIA_TYPE: ('Unsupported Media Type', 'Entity body in unsupported format'), HTTPStatus.REQUESTED_RANGE_NOT_SATISFIABLE: ('Requested Range Not Satisfiable', 'Cannot satisfy request range'), HTTPStatus.EXPECTATION_FAILED: ('Expectation Failed', 'Expect condition could not be satisfied'), HTTPStatus.UNPROCESSABLE_ENTITY: ('Unprocessable Entity', ''), HTTPStatus.LOCKED: ('Locked', ''), HTTPStatus.FAILED_DEPENDENCY: ('Failed Dependency', ''), HTTPStatus.UPGRADE_REQUIRED: ('Upgrade Required', ''), HTTPStatus.PRECONDITION_REQUIRED: ('Precondition Required', 'The origin server requires the request to be conditional'), HTTPStatus.TOO_MANY_REQUESTS: ('Too Many Requests', 'The user has sent too many requests in a given amount of time ("rate limiting")'), HTTPStatus.REQUEST_HEADER_FIELDS_TOO_LARGE: ('Request Header Fields Too Large', 'The server is unwilling to process the request because its header fields are too large'), HTTPStatus.INTERNAL_SERVER_ERROR: ('Internal Server Error', 'Server got itself in trouble'), HTTPStatus.NOT_IMPLEMENTED: ('Not Implemented', 'Server does not support this operation'), HTTPStatus.BAD_GATEWAY: ('Bad Gateway', 'Invalid responses from another server/proxy'), HTTPStatus.SERVICE_UNAVAILABLE: ('Service Unavailable', 'The server cannot process the request due to a high load'), HTTPStatus.GATEWAY_TIMEOUT: ('Gateway Timeout', 'The gateway server did not receive a timely response'), HTTPStatus.HTTP_VERSION_NOT_SUPPORTED: ('HTTP Version Not Supported', 'Cannot fulfill request'), HTTPStatus.VARIANT_ALSO_NEGOTIATES: ('Variant Also Negotiates', ''), HTTPStatus.INSUFFICIENT_STORAGE: ('Insufficient Storage', ''), HTTPStatus.LOOP_DETECTED: ('Loop Detected', ''), HTTPStatus.NOT_EXTENDED: ('Not Extended', ''), HTTPStatus.NETWORK_AUTHENTICATION_REQUIRED: ('Network Authentication Required', 'The client needs to authenticate to gain network access')}
send_error(code, message=None, explain=None)

Send and log an error reply.

Arguments are * code: an HTTP error code

3 digits

  • message: a simple optional 1 line reason phrase.

    *( HTAB / SP / VCHAR / %x80-FF ) defaults to short entry matching the response code

  • explain: a detailed message defaults to the long entry

    matching the response code.

This sends an error response (so it must be called before any output has been generated), logs the error, and finally sends a piece of HTML explaining the error to the user.

send_header(keyword, value)

Send a MIME header to the headers buffer.

send_response(code, message=None)

Add the response header to the headers buffer and log the response code.

Also send two standard headers with the server software version and the current date.

send_response_only(code, message=None)

Send the response header only.

server_version = 'BaseHTTP/0.6'
sys_version = 'Python/3.12.7'
version_string()

Return the server software version string.

weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
class eventlet.green.http.server.CGIHTTPRequestHandler(request, client_address, server)

基类:SimpleHTTPRequestHandler

Complete HTTP server with GET, HEAD and POST commands.

GET and HEAD also support running CGI scripts.

The POST command is only implemented for CGI scripts.

cgi_directories = ['/cgi-bin', '/htbin']
do_POST()

Serve a POST request.

This is only implemented for CGI scripts.

have_fork = True
is_cgi()

Test whether self.path corresponds to a CGI script.

Returns True and updates the cgi_info attribute to the tuple (dir, rest) if self.path requires running a CGI script. Returns False otherwise.

If any exception is raised, the caller should assume that self.path was rejected as invalid and act accordingly.

The default implementation tests whether the normalized url path begins with one of the strings in self.cgi_directories (and the next character is a '/' or the end of the string).

is_executable(path)

Test whether argument path is an executable file.

is_python(path)

Test whether argument path is a Python script.

rbufsize = 0
run_cgi()

Execute a CGI script.

send_head()

Version of send_head that support CGI scripts

class eventlet.green.http.server.HTTPServer(server_address, RequestHandlerClass, bind_and_activate=True)

基类:TCPServer

allow_reuse_address = 1
server_bind()

Override server_bind to store the server name.

class eventlet.green.http.server.SimpleHTTPRequestHandler(request, client_address, server)

基类:BaseHTTPRequestHandler

Simple HTTP request handler with GET and HEAD commands.

This serves files from the current directory and any of its subdirectories. The MIME type for files is determined by calling the .guess_type() method.

The GET and HEAD requests are identical except that the HEAD request omits the actual contents of the file.

copyfile(source, outputfile)

Copy all data between two file objects.

The SOURCE argument is a file object open for reading (or anything with a read() method) and the DESTINATION argument is a file object open for writing (or anything with a write() method).

The only reason for overriding this would be to change the block size or perhaps to replace newlines by CRLF -- note however that this the default server uses this to copy binary data as well.

do_GET()

Serve a GET request.

do_HEAD()

Serve a HEAD request.

extensions_map = {'': 'application/octet-stream', '.%': 'application/x-trash', '.123': 'application/vnd.lotus-1-2-3', '.1905.1': 'application/vnd.ieee.1905', '.1clr': 'application/clr', '.1km': 'application/vnd.1000minds.decision-model+xml', '.210': 'application/p21', '.3dm': 'text/vnd.in3d.3dml', '.3dml': 'text/vnd.in3d.3dml', '.3g2': 'audio/3gpp2', '.3gp': 'audio/3gpp', '.3gpp': 'audio/3gpp', '.3gpp2': 'audio/3gpp2', '.3mf': 'application/vnd.ms-3mfdocument', '.3tz': 'application/vnd.maxar.archive.3tz+zip', '.726': 'audio/32kadpcm', '.7z': 'application/x-7z-compressed', '.AMR': 'audio/AMR', '.AWB': 'audio/AMR-WB', '.CQL': 'text/cql', '.PGB': 'image/vnd.globalgraphics.pgb', '.QCP': 'audio/EVRC-QCP', '.SAR': 'application/vnd.sar', '.VES': 'application/vnd.ves.encrypted', '.a': 'text/vnd.a', '.a2l': 'application/A2L', '.aa3': 'audio/ATRAC3', '.aac': 'audio/aac', '.aal': 'audio/ATRAC-ADVANCED-LOSSLESS', '.abc': 'text/vnd.abc', '.abw': 'application/x-abiword', '.ac': 'application/pkix-attr-cert', '.ac2': 'application/vnd.banana-accounting', '.ac3': 'audio/ac3', '.acc': 'application/vnd.americandynamics.acc', '.acn': 'audio/asc', '.acu': 'application/vnd.acucobol', '.acutc': 'application/vnd.acucorp', '.adts': 'audio/aac', '.aep': 'application/vnd.audiograph', '.afp': 'application/vnd.afpc.modca', '.age': 'application/vnd.age', '.ahead': 'application/vnd.ahead.space', '.ai': 'application/postscript', '.aif': 'audio/x-aiff', '.aifc': 'audio/x-aiff', '.aiff': 'audio/x-aiff', '.aion': 'application/vnd.veritone.aion+json', '.ait': 'application/vnd.dvb.ait', '.alc': 'chemical/x-alchemy', '.ami': 'application/vnd.amiga.ami', '.aml': 'application/AML', '.amr': 'audio/AMR', '.anx': 'application/annodex', '.apk': 'application/vnd.android.package-archive', '.apkg': 'application/vnd.anki', '.apng': 'image/vnd.mozilla.apng', '.appcache': 'text/cache-manifest', '.apr': 'application/vnd.lotus-approach', '.apxml': 'application/auth-policy+xml', '.arrow': 'application/vnd.apache.arrow.file', '.arrows': 'application/vnd.apache.arrow.stream', '.art': 'message/rfc822', '.artisan': 'application/vnd.artisan+json', '.asc': 'application/pgp-keys', '.ascii': 'text/vnd.ascii-art', '.asf': 'application/vnd.ms-asf', '.asice': 'application/vnd.etsi.asic-e+zip', '.asics': 'application/vnd.etsi.asic-s+zip', '.asn': 'chemical/x-ncbi-asn1-spec', '.aso': 'chemical/x-ncbi-asn1-binary', '.ass': 'audio/aac', '.at3': 'audio/ATRAC3', '.atc': 'application/vnd.acucorp', '.atf': 'application/ATF', '.atfx': 'application/ATFX', '.atom': 'application/atom+xml', '.atomcat': 'application/atomcat+xml', '.atomdeleted': 'application/atomdeleted+xml', '.atomsrv': 'application/atomserv+xml', '.atomsvc': 'application/atomsvc+xml', '.atx': 'audio/ATRAC-X', '.atxml': 'application/ATXML', '.au': 'audio/basic', '.auc': 'application/tamp-apex-update-confirm', '.avci': 'image/avci', '.avcs': 'image/avcs', '.avi': 'video/x-msvideo', '.avif': 'image/avif', '.awb': 'audio/AMR-WB', '.axa': 'audio/annodex', '.axv': 'video/annodex', '.azf': 'application/vnd.airzip.filesecure.azf', '.azs': 'application/vnd.airzip.filesecure.azs', '.azv': 'image/vnd.airzip.accelerator.azv', '.azw3': 'application/vnd.amazon.mobi8-ebook', '.b': 'chemical/x-molconn-Z', '.b16': 'image/vnd.pco.b16', '.bak': 'application/x-trash', '.bar': 'application/vnd.qualcomm.brew-app-res', '.bat': 'application/x-msdos-program', '.bcpio': 'application/x-bcpio', '.bdm': 'application/vnd.syncml.dm+wbxml', '.bed': 'application/vnd.realvnc.bed', '.bh2': 'application/vnd.fujitsu.oasysprs', '.bib': 'text/x-bibtex', '.bik': 'video/vnd.radgamettools.bink', '.bin': 'application/octet-stream', '.bk2': 'video/vnd.radgamettools.bink', '.bkm': 'application/vnd.nervana', '.bmed': 'multipart/vnd.bint.med-plus', '.bmi': 'application/vnd.bmi', '.bmml': 'application/vnd.balsamiq.bmml+xml', '.bmp': 'image/bmp', '.bmpr': 'application/vnd.balsamiq.bmpr', '.boo': 'text/x-boo', '.book': 'application/x-maker', '.box': 'application/vnd.previewsystems.box', '.bpd': 'application/vnd.hbci', '.brf': 'text/plain', '.bsd': 'chemical/x-crossfire', '.bsp': 'model/vnd.valve.source.compiled-map', '.btf': 'image/prs.btif', '.btif': 'image/prs.btif', '.c': 'text/plain', '.c++': 'text/x-c++src', '.c11amc': 'application/vnd.cluetrust.cartomobile-config', '.c11amz': 'application/vnd.cluetrust.cartomobile-config-pkg', '.c3d': 'chemical/x-chem3d', '.c3ex': 'application/cccex', '.c4d': 'application/vnd.clonk.c4group', '.c4f': 'application/vnd.clonk.c4group', '.c4g': 'application/vnd.clonk.c4group', '.c4p': 'application/vnd.clonk.c4group', '.c4u': 'application/vnd.clonk.c4group', '.c9r': 'application/vnd.cryptomator.encrypted', '.c9s': 'application/vnd.cryptomator.encrypted', '.cab': 'application/vnd.ms-cab-compressed', '.cac': 'chemical/x-cache', '.cache': 'chemical/x-cache', '.cap': 'application/vnd.tcpdump.pcap', '.carjson': 'application/vnd.eu.kasparian.car+json', '.cascii': 'chemical/x-cactvs-binary', '.cat': 'application/vnd.ms-pki.seccat', '.cbin': 'chemical/x-cactvs-binary', '.cbor': 'application/cbor', '.cbr': 'application/vnd.comicbook-rar', '.cbz': 'application/vnd.comicbook+zip', '.cc': 'text/x-c++src', '.ccc': 'text/vnd.net2phone.commcenter.command', '.ccmp': 'application/ccmp+xml', '.ccxml': 'application/ccxml+xml', '.cda': 'application/x-cdf', '.cdbcmsg': 'application/vnd.contact.cmsg', '.cdf': 'application/x-cdf', '.cdfx': 'application/CDFX+XML', '.cdkey': 'application/vnd.mediastation.cdkey', '.cdmia': 'application/cdmi-capability', '.cdmic': 'application/cdmi-container', '.cdmid': 'application/cdmi-domain', '.cdmio': 'application/cdmi-object', '.cdmiq': 'application/cdmi-queue', '.cdr': 'image/x-coreldraw', '.cdt': 'image/x-coreldrawtemplate', '.cdx': 'chemical/x-cdx', '.cdxml': 'application/vnd.chemdraw+xml', '.cdy': 'application/vnd.cinderella', '.cea': 'application/CEA', '.cef': 'chemical/x-cxf', '.cellml': 'application/cellml+xml', '.cer': 'application/pkix-cert', '.cgm': 'image/cgm', '.chm': 'chemical/x-chemdraw', '.chrt': 'application/vnd.kde.kchart', '.cif': 'chemical/x-cif', '.cii': 'application/vnd.anser-web-certificate-issue-initiation', '.cil': 'application/vnd.ms-artgalry', '.cl': 'application/simple-filter+xml', '.cla': 'application/vnd.claymore', '.class': 'application/java-vm', '.clkk': 'application/vnd.crick.clicker.keyboard', '.clkp': 'application/vnd.crick.clicker.palette', '.clkt': 'application/vnd.crick.clicker.template', '.clkw': 'application/vnd.crick.clicker.wordbank', '.clkx': 'application/vnd.crick.clicker', '.cls': 'text/x-tex', '.clue': 'application/clue_info+xml', '.cmc': 'application/vnd.cosmocaller', '.cmdf': 'chemical/x-cmdf', '.cml': 'chemical/x-cml', '.cmp': 'application/vnd.yellowriver-custom-menu', '.cmsc': 'application/cms', '.cnd': 'text/jcr-cnd', '.cod': 'application/vnd.rim.cod', '.coffee': 'application/vnd.coffeescript', '.com': 'application/x-msdos-program', '.copyright': 'text/vnd.debian.copyright', '.cpa': 'chemical/x-compass', '.cpio': 'application/x-cpio', '.cpkg': 'application/vnd.xmpie.cpkg', '.cpl': 'application/cpl+xml', '.cpp': 'text/x-c++src', '.cpt': 'image/x-corelphotopaint', '.cr2': 'image/x-canon-cr2', '.crl': 'application/pkix-crl', '.crt': 'application/x-x509-ca-cert', '.crtr': 'application/vnd.multiad.creator', '.crw': 'image/x-canon-crw', '.cryptomator': 'application/vnd.cryptomator.vault', '.cryptonote': 'application/vnd.rig.cryptonote', '.csd': 'audio/csound', '.csf': 'chemical/x-cache-csf', '.csh': 'text/x-csh', '.csl': 'application/vnd.citationstyles.style+xml', '.csm': 'chemical/x-csml', '.csml': 'chemical/x-csml', '.csp': 'application/vnd.commonspace', '.csrattrs': 'application/csrattrs', '.css': 'text/css', '.cst': 'application/vnd.commonspace', '.csv': 'text/csv', '.csvs': 'text/csv-schema', '.ctab': 'chemical/x-cactvs-binary', '.ctx': 'chemical/x-ctx', '.cu': 'application/cu-seeme', '.cub': 'chemical/x-gaussian-cube', '.cuc': 'application/tamp-community-update-confirm', '.curl': 'text/vnd.curl', '.cw': 'application/prs.cww', '.cww': 'application/prs.cww', '.cxf': 'chemical/x-cxf', '.cxx': 'text/x-c++src', '.d': 'text/x-dsrc', '.dae': 'model/vnd.collada+xml', '.daf': 'application/vnd.Mobius.DAF', '.dart': 'application/vnd.dart', '.dataless': 'application/vnd.fdsn.seed', '.davmount': 'application/davmount+xml', '.dbf': 'application/vnd.dbf', '.dcd': 'application/DCD', '.dcm': 'application/dicom', '.dcr': 'application/x-director', '.dd2': 'application/vnd.oma.dd2+xml', '.ddd': 'application/vnd.fujixerox.ddd', '.ddeb': 'application/vnd.debian.binary-package', '.ddf': 'application/vnd.syncml.dmddf+xml', '.deb': 'application/vnd.debian.binary-package', '.deploy': 'application/octet-stream', '.dfac': 'application/vnd.dreamfactory', '.dif': 'video/dv', '.diff': 'text/x-diff', '.dii': 'application/DII', '.dim': 'application/vnd.fastcopy-disk-image', '.dir': 'application/x-director', '.dis': 'application/vnd.Mobius.DIS', '.dist': 'application/vnd.apple.installer+xml', '.distz': 'application/vnd.apple.installer+xml', '.dit': 'application/DIT', '.dive': 'application/vnd.patentdive', '.djv': 'image/vnd.djvu', '.djvu': 'image/vnd.djvu', '.dl': 'video/dl', '.dll': 'application/x-msdos-program', '.dls': 'audio/dls', '.dmg': 'application/x-apple-diskimage', '.dmp': 'application/vnd.tcpdump.pcap', '.dms': 'text/vnd.DMClientScript', '.dna': 'application/vnd.dna', '.doc': 'application/msword', '.docjson': 'application/vnd.document+json', '.docm': 'application/vnd.ms-word.document.macroEnabled.12', '.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '.dor': 'model/vnd.gdl', '.dot': 'text/vnd.graphviz', '.dotm': 'application/vnd.ms-word.template.macroEnabled.12', '.dotx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', '.dp': 'application/vnd.osgi.dp', '.dpg': 'application/vnd.dpgraph', '.dpgraph': 'application/vnd.dpgraph', '.dpkg': 'application/vnd.xmpie.dpkg', '.drle': 'image/dicom-rle', '.dsc': 'text/prs.lines.tag', '.dsm': 'application/vnd.desmume.movie', '.dssc': 'application/dssc+der', '.dtd': 'application/xml-dtd', '.dts': 'audio/vnd.dts', '.dtshd': 'audio/vnd.dts.hd', '.dv': 'video/dv', '.dvb': 'video/vnd.dvb.file', '.dvc': 'application/dvcs', '.dvi': 'application/x-dvi', '.dwd': 'application/atsc-dwd+xml', '.dwf': 'model/vnd.dwf', '.dwg': 'image/vnd.dwg', '.dx': 'chemical/x-jcamp-dx', '.dxf': 'image/vnd.dxf', '.dxp': 'application/vnd.spotfire.dxp', '.dxr': 'application/x-director', '.dzr': 'application/vnd.dzr', '.ecelp4800': 'audio/vnd.nuera.ecelp4800', '.ecelp7470': 'audio/vnd.nuera.ecelp7470', '.ecelp9600': 'audio/vnd.nuera.ecelp9600', '.ecig': 'application/vnd.evolv.ecig.settings', '.ecigprofile': 'application/vnd.evolv.ecig.profile', '.ecigtheme': 'application/vnd.evolv.ecig.theme', '.edm': 'application/vnd.novadigm.EDM', '.edx': 'application/vnd.novadigm.EDX', '.efi': 'application/efi', '.efif': 'application/vnd.picsel', '.ei6': 'application/vnd.pg.osasli', '.emb': 'chemical/x-embl-dl-nucleotide', '.embl': 'chemical/x-embl-dl-nucleotide', '.emf': 'image/emf', '.eml': 'message/rfc822', '.emm': 'application/vnd.ibm.electronic-media', '.emma': 'application/emma+xml', '.emotionml': 'application/emotionml+xml', '.ent': 'application/xml-external-parsed-entity', '.entity': 'application/vnd.nervana', '.enw': 'audio/EVRCNW', '.eol': 'audio/vnd.digital-winds', '.eot': 'application/vnd.ms-fontobject', '.ep': 'application/vnd.bluetooth.ep.oob', '.eps': 'application/postscript', '.eps2': 'application/postscript', '.eps3': 'application/postscript', '.epsf': 'application/postscript', '.epsi': 'application/postscript', '.epub': 'application/epub+zip', '.erf': 'image/x-epson-erf', '.es': 'text/javascript', '.es3': 'application/vnd.eszigno3+xml', '.esa': 'application/vnd.osgi.subsystem', '.esf': 'application/vnd.epson.esf', '.espass': 'application/vnd.espass-espass+zip', '.et3': 'application/vnd.eszigno3+xml', '.etx': 'text/x-setext', '.evb': 'audio/EVRCB', '.evc': 'audio/EVRC', '.evw': 'audio/EVRCWB', '.exe': 'application/x-msdos-program', '.exi': 'application/exi', '.exp': 'application/express', '.exr': 'image/aces', '.ext': 'application/vnd.novadigm.EXT', '.ez': 'application/andrew-inset', '.ez2': 'application/vnd.ezpix-album', '.ez3': 'application/vnd.ezpix-package', '.fb': 'application/x-maker', '.fbdoc': 'application/x-maker', '.fbs': 'image/vnd.fastbidsheet', '.fcdt': 'application/vnd.adobe.formscentral.fcdt', '.fch': 'chemical/x-gaussian-checkpoint', '.fchk': 'chemical/x-gaussian-checkpoint', '.fcs': 'application/vnd.isac.fcs', '.fdf': 'application/vnd.fdf', '.fdt': 'application/fdt+xml', '.fe_launch': 'application/vnd.denovo.fcselayout-link', '.fg5': 'application/vnd.fujitsu.oasysgp', '.fig': 'application/x-xfig', '.finf': 'application/fastinfoset', '.fit': 'image/fits', '.fits': 'image/fits', '.fla': 'application/vnd.dtg.local.flash', '.flac': 'audio/flac', '.flb': 'application/vnd.ficlab.flb+zip', '.fli': 'video/fli', '.flo': 'application/vnd.micrografx.flo', '.flt': 'text/vnd.ficlab.flt', '.flv': 'video/x-flv', '.flw': 'application/vnd.kde.kivio', '.flx': 'text/vnd.fmi.flexstor', '.fly': 'text/vnd.fly', '.fm': 'application/x-maker', '.fo': 'application/vnd.software602.filler.form+xml', '.fpx': 'image/vnd.fpx', '.frame': 'application/x-maker', '.frm': 'application/x-maker', '.fsc': 'application/vnd.fsc.weblaunch', '.fst': 'image/vnd.fst', '.ftc': 'application/vnd.fluxtime.clip', '.fti': 'application/vnd.anser-web-funds-transfer-initiation', '.fts': 'image/fits', '.fvt': 'video/vnd.fvt', '.fxp': 'application/vnd.adobe.fxp', '.fxpl': 'application/vnd.adobe.fxp', '.fzs': 'application/vnd.fuzzysheet', '.g2w': 'application/vnd.geoplan', '.g3w': 'application/vnd.geospace', '.gac': 'application/vnd.groove-account', '.gal': 'chemical/x-gaussian-log', '.gam': 'chemical/x-gamess-input', '.gamin': 'chemical/x-gamess-input', '.gan': 'application/x-ganttproject', '.gau': 'chemical/x-gaussian-input', '.gbr': 'application/rpki-ghostbusters', '.gcd': 'text/x-pcs-gcd', '.gcf': 'application/x-graphing-calculator', '.gcg': 'chemical/x-gcg8-sequence', '.gdl': 'model/vnd.gdl', '.gdz': 'application/vnd.familysearch.gedcom+zip', '.ged': 'text/vnd.familysearch.gedcom', '.gen': 'chemical/x-genbank', '.geo': 'application/vnd.dynageo', '.geojson': 'application/geo+json', '.gex': 'application/vnd.geometry-explorer', '.gf': 'application/x-tex-gf', '.gff3': 'text/gff3', '.ggb': 'application/vnd.geogebra.file', '.ggs': 'application/vnd.geogebra.slides', '.ggt': 'application/vnd.geogebra.tool', '.ghf': 'application/vnd.groove-help', '.gif': 'image/gif', '.gim': 'application/vnd.groove-identity-message', '.gjc': 'chemical/x-gaussian-input', '.gjf': 'chemical/x-gaussian-input', '.gl': 'video/gl', '.glb': 'model/gltf-binary', '.glbin': 'application/gltf-buffer', '.glbuf': 'application/gltf-buffer', '.gltf': 'model/gltf+json', '.gml': 'application/gml+xml', '.gnumeric': 'application/x-gnumeric', '.gph': 'application/vnd.FloGraphIt', '.gpkg': 'application/geopackage+sqlite3', '.gpt': 'chemical/x-mopac-graph', '.gqf': 'application/vnd.grafeq', '.gqs': 'application/vnd.grafeq', '.gram': 'application/srgs', '.gre': 'application/vnd.geometry-explorer', '.grv': 'application/vnd.groove-injector', '.grxml': 'application/srgs+xml', '.gsf': 'application/x-font', '.gsheet': 'application/urc-grpsheet+xml', '.gsm': 'model/vnd.gdl', '.gtar': 'application/x-gtar', '.gtm': 'application/vnd.groove-tool-message', '.gtw': 'model/vnd.gtw', '.gv': 'text/vnd.graphviz', '.gxt': 'application/vnd.geonext', '.gz': 'application/gzip', '.h': 'text/plain', '.h++': 'text/x-c++hdr', '.h5': 'application/x-hdf5', '.hal': 'application/vnd.hal+xml', '.hans': 'text/vnd.hans', '.hbc': 'application/vnd.hbci', '.hbci': 'application/vnd.hbci', '.hdf': 'application/x-hdf', '.hdr': 'image/vnd.radiance', '.hdt': 'application/vnd.hdt', '.heic': 'image/heic', '.heics': 'image/heic-sequence', '.heif': 'image/heif', '.heifs': 'image/heif-sequence', '.hej2': 'image/hej2k', '.held': 'application/atsc-held+xml', '.hgl': 'text/vnd.hgl', '.hh': 'text/x-c++hdr', '.hif': 'image/avif', '.hin': 'chemical/x-hin', '.hpgl': 'application/vnd.hp-HPGL', '.hpi': 'application/vnd.hp-hpid', '.hpid': 'application/vnd.hp-hpid', '.hpp': 'text/x-c++hdr', '.hps': 'application/vnd.hp-hps', '.hpub': 'application/prs.hpub+zip', '.hqx': 'application/mac-binhex40', '.hs': 'text/x-haskell', '.hsj2': 'image/hsj2', '.hta': 'application/hta', '.htc': 'text/x-component', '.htke': 'application/vnd.kenameaapp', '.htm': 'text/html', '.html': 'text/html', '.hvd': 'application/vnd.yamaha.hv-dic', '.hvp': 'application/vnd.yamaha.hv-voice', '.hvs': 'application/vnd.yamaha.hv-script', '.hwp': 'application/x-hwp', '.hxx': 'text/x-c++hdr', '.i2g': 'application/vnd.intergeo', '.ic0': 'application/vnd.commerce-battelle', '.ic1': 'application/vnd.commerce-battelle', '.ic2': 'application/vnd.commerce-battelle', '.ic3': 'application/vnd.commerce-battelle', '.ic4': 'application/vnd.commerce-battelle', '.ic5': 'application/vnd.commerce-battelle', '.ic6': 'application/vnd.commerce-battelle', '.ic7': 'application/vnd.commerce-battelle', '.ic8': 'application/vnd.commerce-battelle', '.ica': 'application/x-ica', '.icc': 'application/vnd.iccprofile', '.icd': 'application/vnd.commerce-battelle', '.icf': 'application/vnd.commerce-battelle', '.icm': 'application/vnd.iccprofile', '.ico': 'image/vnd.microsoft.icon', '.ics': 'text/calendar', '.ief': 'image/ief', '.ifb': 'text/calendar', '.ifc': 'application/p21', '.ifm': 'application/vnd.shana.informed.formdata', '.iges': 'model/iges', '.igl': 'application/vnd.igloader', '.igm': 'application/vnd.insors.igm', '.ign': 'application/vnd.coreos.ignition+json', '.ignition': 'application/vnd.coreos.ignition+json', '.igs': 'model/iges', '.igx': 'application/vnd.micrografx.igx', '.iif': 'application/vnd.shana.informed.interchange', '.iii': 'application/x-iphone', '.imf': 'application/vnd.imagemeter.folder+zip', '.imgcal': 'application/vnd.3lightssoftware.imagescal', '.imi': 'application/vnd.imagemeter.image+zip', '.imp': 'application/vnd.accpac.simply.imp', '.ims': 'application/vnd.ms-ims', '.imscc': 'application/vnd.ims.imsccv1p1', '.info': 'application/x-info', '.ink': 'application/inkml+xml', '.inkml': 'application/inkml+xml', '.inp': 'chemical/x-gamess-input', '.ins': 'application/x-internet-signup', '.iota': 'application/vnd.astraea-software.iota', '.ipfix': 'application/ipfix', '.ipk': 'application/vnd.shana.informed.package', '.irm': 'application/vnd.ibm.rights-management', '.irp': 'application/vnd.irepository.package+xml', '.ism': 'model/vnd.gdl', '.iso': 'application/x-iso9660-image', '.isp': 'application/x-internet-signup', '.ist': 'chemical/x-isostar', '.istc': 'application/vnd.veryant.thin', '.istr': 'chemical/x-isostar', '.isws': 'application/vnd.veryant.thin', '.itp': 'application/vnd.shana.informed.formtemplate', '.its': 'application/its+xml', '.ivp': 'application/vnd.immervision-ivp', '.ivu': 'application/vnd.immervision-ivu', '.jad': 'text/vnd.sun.j2me.app-descriptor', '.jam': 'application/vnd.jam', '.jar': 'application/java-archive', '.java': 'text/x-java', '.jdx': 'chemical/x-jcamp-dx', '.jfif': 'image/jpeg', '.jhc': 'image/jphc', '.jisp': 'application/vnd.jisp', '.jls': 'image/jls', '.jlt': 'application/vnd.hp-jlyt', '.jmz': 'application/x-jmol', '.jng': 'image/x-jng', '.jnlp': 'application/x-java-jnlp-file', '.joda': 'application/vnd.joost.joda-archive', '.jp2': 'image/jp2', '.jpe': 'image/jpeg', '.jpeg': 'image/jpeg', '.jpf': 'image/jpx', '.jpg': 'image/jpeg', '.jpg2': 'image/jp2', '.jpgm': 'image/jpm', '.jph': 'image/jph', '.jphc': 'image/jphc', '.jpm': 'image/jpm', '.jpx': 'image/jpx', '.jrd': 'application/jrd+json', '.js': 'text/javascript', '.json': 'application/json', '.json-patch': 'application/json-patch+json', '.jsonld': 'application/ld+json', '.jsontd': 'application/td+json', '.jtd': 'text/vnd.esmertec.theme-descriptor', '.jxl': 'image/jxl', '.jxr': 'image/jxr', '.jxra': 'image/jxrA', '.jxrs': 'image/jxrS', '.jxs': 'image/jxs', '.jxsc': 'image/jxsc', '.jxsi': 'image/jxsi', '.jxss': 'image/jxss', '.karbon': 'application/vnd.kde.karbon', '.kcm': 'application/vnd.nervana', '.key': 'application/pgp-keys', '.keynote': 'application/vnd.apple.keynote', '.kfo': 'application/vnd.kde.kformula', '.kia': 'application/vnd.kidspiration', '.kil': 'application/x-killustrator', '.kin': 'chemical/x-kinemage', '.kml': 'application/vnd.google-earth.kml+xml', '.kmz': 'application/vnd.google-earth.kmz', '.kne': 'application/vnd.Kinar', '.knp': 'application/vnd.Kinar', '.kom': 'application/vnd.hbci', '.kon': 'application/vnd.kde.kontour', '.koz': 'audio/vnd.audiokoz', '.kpr': 'application/vnd.kde.kpresenter', '.kpt': 'application/vnd.kde.kpresenter', '.ksh': 'text/plain', '.ksp': 'application/vnd.kde.kspread', '.ktr': 'application/vnd.kahootz', '.ktx': 'image/ktx', '.ktx2': 'image/ktx2', '.ktz': 'application/vnd.kahootz', '.kwd': 'application/vnd.kde.kword', '.kwt': 'application/vnd.kde.kword', '.l16': 'audio/L16', '.las': 'application/vnd.las', '.lasjson': 'application/vnd.las.las+json', '.lasxml': 'application/vnd.las.las+xml', '.latex': 'application/x-latex', '.lbc': 'audio/iLBC', '.lbd': 'application/vnd.llamagraphics.life-balance.desktop', '.lbe': 'application/vnd.llamagraphics.life-balance.exchange+xml', '.lca': 'application/vnd.logipipe.circuit+zip', '.lcs': 'application/vnd.logipipe.circuit+zip', '.le': 'application/vnd.bluetooth.le.oob', '.les': 'application/vnd.hhe.lesson-player', '.lgr': 'application/lgr+xml', '.lha': 'application/x-lha', '.lhs': 'text/x-literate-haskell', '.lin': 'application/bbolin', '.line': 'application/vnd.nebumind.line', '.link66': 'application/vnd.route66.link66+xml', '.list3820': 'application/vnd.afpc.modca', '.listafp': 'application/vnd.afpc.modca', '.lmp': 'model/vnd.gdl', '.loas': 'audio/usac', '.loom': 'application/vnd.loom', '.lostsyncxml': 'application/lostsync+xml', '.lostxml': 'application/lost+xml', '.lpf': 'application/lpf+zip', '.lrm': 'application/vnd.ms-lrm', '.lsf': 'video/x-la-asf', '.lsx': 'video/x-la-asf', '.ltx': 'text/x-tex', '.lvp': 'audio/vnd.lucent.voice', '.lwp': 'application/vnd.lotus-wordpro', '.lxf': 'application/LXF', '.ly': 'text/x-lilypond', '.lyx': 'application/x-lyx', '.lzh': 'application/x-lzh', '.lzx': 'application/x-lzx', '.m': 'application/vnd.wolfram.mathematica.package', '.m1v': 'video/mpeg', '.m21': 'application/mp21', '.m2v': 'video/mpeg', '.m3g': 'application/m3g', '.m3u': 'audio/mpegurl', '.m3u8': 'application/vnd.apple.mpegurl', '.m4a': 'audio/mp4', '.m4s': 'video/iso.segment', '.m4u': 'video/vnd.mpegurl', '.m4v': 'video/mp4', '.ma': 'application/mathematica', '.mads': 'application/mads+xml', '.maei': 'application/mmt-aei+xml', '.mag': 'application/vnd.ecowin.chart', '.mail': 'message/rfc822', '.maker': 'application/x-maker', '.man': 'application/x-troff-man', '.manifest': 'text/cache-manifest', '.markdown': 'text/markdown', '.mb': 'application/mathematica', '.mbk': 'application/vnd.Mobius.MBK', '.mbox': 'application/mbox', '.mc1': 'application/vnd.medcalcdata', '.mc2': 'text/vnd.senx.warpscript', '.mcd': 'application/vnd.mcd', '.mcif': 'chemical/x-mmcif', '.mcm': 'chemical/x-macmolecule', '.md': 'text/markdown', '.mdb': 'application/msaccess', '.mdc': 'application/vnd.marlin.drm.mdcf', '.mdi': 'image/vnd.ms-modi', '.me': 'application/x-troff-me', '.mesh': 'model/mesh', '.meta4': 'application/metalink4+xml', '.mets': 'application/mets+xml', '.mf4': 'application/MF4', '.mfm': 'application/vnd.mfmp', '.mft': 'application/rpki-manifest', '.mgp': 'application/vnd.osgeo.mapguide.package', '.mgz': 'application/vnd.proteus.magazine', '.mhas': 'audio/mhas', '.mht': 'message/rfc822', '.mhtml': 'message/rfc822', '.mid': 'audio/sp-midi', '.mif': 'application/vnd.mif', '.miz': 'text/mizar', '.mj2': 'video/mj2', '.mjp2': 'video/mj2', '.mjs': 'text/javascript', '.mkv': 'video/x-matroska', '.mlp': 'audio/vnd.dolby.mlp', '.mm': 'application/x-freemind', '.mmd': 'application/vnd.chipnuts.karaoke-mmd', '.mmdb': 'application/vnd.maxmind.maxmind-db', '.mmf': 'application/vnd.smaf', '.mml': 'application/mathml+xml', '.mmod': 'chemical/x-macromodel-input', '.mmr': 'image/vnd.fujixerox.edmics-mmr', '.mng': 'video/x-mng', '.moc': 'text/x-moc', '.mod': 'application/xml-dtd', '.model-inter': 'application/vnd.vd-study', '.mods': 'application/mods+xml', '.mol': 'chemical/x-mdl-molfile', '.mol2': 'chemical/x-mol2', '.moml': 'model/vnd.moml+xml', '.moo': 'chemical/x-mopac-out', '.mop': 'chemical/x-mopac-input', '.mopcrt': 'chemical/x-mopac-input', '.mov': 'video/quicktime', '.movie': 'video/x-sgi-movie', '.mp1': 'audio/mpeg', '.mp2': 'audio/mpeg', '.mp21': 'application/mp21', '.mp3': 'audio/mpeg', '.mp4': 'video/mp4', '.mpa': 'video/mpeg', '.mpc': 'chemical/x-mopac-input', '.mpd': 'application/dash+xml', '.mpdd': 'application/dashdelta', '.mpe': 'video/mpeg', '.mpeg': 'video/mpeg', '.mpega': 'audio/mpeg', '.mpf': 'text/vnd.ms-mediapackage', '.mpg': 'video/mpeg', '.mpg4': 'video/mp4', '.mpga': 'audio/mpeg', '.mph': 'application/x-comsol', '.mpkg': 'application/vnd.apple.installer+xml', '.mpm': 'application/vnd.blueice.multipass', '.mpn': 'application/vnd.mophun.application', '.mpp': 'application/vnd.ms-project', '.mpt': 'application/vnd.ms-project', '.mpv': 'video/x-matroska', '.mpw': 'application/vnd.exstream-empower+zip', '.mpy': 'application/vnd.ibm.MiniPay', '.mqy': 'application/vnd.Mobius.MQY', '.mrc': 'application/marc', '.mrcx': 'application/marcxml+xml', '.ms': 'application/x-troff-ms', '.msa': 'application/vnd.msa-disk-image', '.msd': 'application/vnd.fdsn.mseed', '.mseed': 'application/vnd.fdsn.mseed', '.mseq': 'application/vnd.mseq', '.msf': 'application/vnd.epson.msf', '.msh': 'model/mesh', '.msi': 'application/x-msi', '.msl': 'application/vnd.Mobius.MSL', '.msm': 'model/vnd.gdl', '.msp': 'application/octet-stream', '.msty': 'application/vnd.muvee.style', '.msu': 'application/octet-stream', '.mtl': 'model/mtl', '.mts': 'model/vnd.mts', '.multitrack': 'audio/vnd.presonus.multitrack', '.mus': 'application/vnd.musician', '.musd': 'application/mmt-usd+xml', '.mvb': 'chemical/x-mopac-vib', '.mvt': 'application/vnd.mapbox-vector-tile', '.mwc': 'application/vnd.dpgraph', '.mwf': 'application/vnd.MFER', '.mxf': 'application/mxf', '.mxi': 'application/vnd.vd-study', '.mxl': 'application/vnd.recordare.musicxml', '.mxmf': 'audio/mobile-xmf', '.mxml': 'application/xv+xml', '.mxs': 'application/vnd.triscape.mxs', '.mxu': 'video/vnd.mpegurl', '.n3': 'text/n3', '.nb': 'application/vnd.wolfram.mathematica', '.nbp': 'application/vnd.wolfram.player', '.nc': 'application/x-netcdf', '.ndc': 'application/vnd.osa.netdeploy', '.ndl': 'application/vnd.lotus-notes', '.nds': 'application/vnd.nintendo.nitro.rom', '.nebul': 'application/vnd.nebumind.line', '.nef': 'image/x-nikon-nef', '.ngdat': 'application/vnd.nokia.n-gage.data', '.nim': 'video/vnd.nokia.interleaved-multimedia', '.nimn': 'application/vnd.nimn', '.nitf': 'application/vnd.nitf', '.nlu': 'application/vnd.neurolanguage.nlu', '.nml': 'application/vnd.enliven', '.nnd': 'application/vnd.noblenet-directory', '.nns': 'application/vnd.noblenet-sealer', '.nnw': 'application/vnd.noblenet-web', '.notebook': 'application/vnd.smart.notebook', '.nq': 'application/n-quads', '.ns2': 'application/vnd.lotus-notes', '.ns3': 'application/vnd.lotus-notes', '.ns4': 'application/vnd.lotus-notes', '.nsf': 'application/vnd.lotus-notes', '.nsg': 'application/vnd.lotus-notes', '.nsh': 'application/vnd.lotus-notes', '.nt': 'application/n-triples', '.ntf': 'application/vnd.lotus-notes', '.numbers': 'application/vnd.apple.numbers', '.nwc': 'application/x-nwc', '.nws': 'message/rfc822', '.o': 'application/x-object', '.oa2': 'application/vnd.fujitsu.oasys2', '.oa3': 'application/vnd.fujitsu.oasys3', '.oas': 'application/vnd.fujitsu.oasys', '.obg': 'application/vnd.openblox.game-binary', '.obgx': 'application/vnd.openblox.game+xml', '.obj': 'model/obj', '.oda': 'application/ODA', '.odb': 'application/vnd.oasis.opendocument.database', '.odc': 'application/vnd.oasis.opendocument.chart', '.odd': 'application/tei+xml', '.odf': 'application/vnd.oasis.opendocument.formula', '.odg': 'application/vnd.oasis.opendocument.graphics', '.odi': 'application/vnd.oasis.opendocument.image', '.odm': 'application/vnd.oasis.opendocument.text-master', '.odp': 'application/vnd.oasis.opendocument.presentation', '.ods': 'application/vnd.oasis.opendocument.spreadsheet', '.odt': 'application/vnd.oasis.opendocument.text', '.odx': 'application/ODX', '.oeb': 'application/vnd.openeye.oeb', '.oga': 'audio/ogg', '.ogex': 'model/vnd.opengex', '.ogg': 'audio/ogg', '.ogv': 'video/ogg', '.ogx': 'application/ogg', '.old': 'application/x-trash', '.omg': 'audio/ATRAC3', '.one': 'application/onenote', '.onepkg': 'application/onenote', '.onetmp': 'application/onenote', '.onetoc2': 'application/onenote', '.opf': 'application/oebps-package+xml', '.oprc': 'application/vnd.palm', '.opus': 'audio/ogg', '.or2': 'application/vnd.lotus-organizer', '.or3': 'application/vnd.lotus-organizer', '.orc': 'audio/csound', '.orf': 'image/x-olympus-orf', '.org': 'application/vnd.lotus-organizer', '.orq': 'application/ocsp-request', '.ors': 'application/ocsp-response', '.osf': 'application/vnd.yamaha.openscoreformat', '.osm': 'application/vnd.openstreetmap.data+xml', '.ota': 'application/vnd.android.ota', '.otc': 'application/vnd.oasis.opendocument.chart-template', '.otf': 'font/otf', '.otg': 'application/vnd.oasis.opendocument.graphics-template', '.oth': 'application/vnd.oasis.opendocument.text-web', '.oti': 'application/vnd.oasis.opendocument.image-template', '.otp': 'application/vnd.oasis.opendocument.presentation-template', '.ots': 'application/vnd.oasis.opendocument.spreadsheet-template', '.ott': 'application/vnd.oasis.opendocument.text-template', '.ovl': 'application/vnd.afpc.modca-overlay', '.oxlicg': 'application/vnd.oxli.countgraph', '.oxps': 'application/oxps', '.oxt': 'application/vnd.openofficeorg.extension', '.oza': 'application/x-oz-application', '.p': 'text/x-pascal', '.p10': 'application/pkcs10', '.p12': 'application/pkcs12', '.p21': 'application/p21', '.p2p': 'application/vnd.wfa.p2p', '.p7c': 'application/pkcs7-mime', '.p7m': 'application/pkcs7-mime', '.p7r': 'application/x-pkcs7-certreqresp', '.p7s': 'application/pkcs7-signature', '.p7z': 'application/pkcs7-mime', '.p8': 'application/pkcs8', '.p8e': 'application/pkcs8-encrypted', '.pac': 'application/x-ns-proxy-autoconfig', '.package': 'application/vnd.autopackage', '.pages': 'application/vnd.apple.pages', '.pas': 'text/x-pascal', '.pat': 'image/x-coreldrawpattern', '.patch': 'text/x-diff', '.paw': 'application/vnd.pawaafile', '.pbd': 'application/vnd.powerbuilder6', '.pbm': 'image/x-portable-bitmap', '.pcap': 'application/vnd.tcpdump.pcap', '.pcf': 'application/x-font-pcf', '.pcf.Z': 'application/x-font-pcf', '.pcl': 'application/vnd.hp-PCL', '.pcx': 'image/vnd.zbrush.pcx', '.pdb': 'chemical/x-pdb', '.pdf': 'application/pdf', '.pdx': 'application/PDX', '.pem': 'application/pem-certificate-chain', '.pfa': 'application/x-font', '.pfb': 'application/x-font', '.pfr': 'application/font-tdpfr', '.pfx': 'application/pkcs12', '.pgb': 'image/vnd.globalgraphics.pgb', '.pgm': 'image/x-portable-graymap', '.pgn': 'application/vnd.chess-pgn', '.pgp': 'application/pgp-encrypted', '.pil': 'application/vnd.piaccess.application-licence', '.pk': 'application/x-tex-pk', '.pkd': 'application/vnd.hbci', '.pkg': 'application/vnd.apple.installer+xml', '.pki': 'application/pkixcmp', '.pkipath': 'application/pkix-pkipath', '.pl': 'text/x-perl', '.plb': 'application/vnd.3gpp.pic-bw-large', '.plc': 'application/vnd.Mobius.PLC', '.plf': 'application/vnd.pocketlearn', '.plj': 'audio/vnd.everad.plj', '.plp': 'application/vnd.panoply', '.pls': 'audio/x-scpls', '.pm': 'text/x-perl', '.pml': 'application/vnd.ctc-posml', '.png': 'image/png', '.pnm': 'image/x-portable-anymap', '.portpkg': 'application/vnd.macports.portpkg', '.pot': 'text/plain', '.potm': 'application/vnd.ms-powerpoint.template.macroEnabled.12', '.potx': 'application/vnd.openxmlformats-officedocument.presentationml.template', '.ppa': 'application/vnd.ms-powerpoint', '.ppam': 'application/vnd.ms-powerpoint.addin.macroEnabled.12', '.ppd': 'application/vnd.cups-ppd', '.ppkg': 'application/vnd.xmpie.ppkg', '.ppm': 'image/x-portable-pixmap', '.pps': 'application/vnd.ms-powerpoint', '.ppsm': 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', '.ppsx': 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', '.ppt': 'application/vnd.ms-powerpoint', '.pptm': 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', '.ppttc': 'application/vnd.think-cell.ppttc+json', '.pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation', '.pqa': 'application/vnd.palm', '.prc': 'model/prc', '.pre': 'application/vnd.lotus-freelance', '.preminet': 'application/vnd.preminet', '.prf': 'application/pics-rules', '.provn': 'text/provenance-notation', '.provx': 'application/provenance+xml', '.prt': 'chemical/x-ncbi-asn1-ascii', '.prz': 'application/vnd.lotus-freelance', '.ps': 'application/postscript', '.psb': 'application/vnd.3gpp.pic-bw-small', '.psd': 'image/vnd.adobe.photoshop', '.pseg3820': 'application/vnd.afpc.modca', '.psfs': 'application/vnd.psfs', '.psg': 'application/vnd.afpc.modca-pagesegment', '.psid': 'audio/prs.sid', '.pskcxml': 'application/pskc+xml', '.pt': 'application/vnd.snesdev-page-table', '.pti': 'image/prs.pti', '.ptid': 'application/vnd.pvi.ptid1', '.ptrom': 'application/vnd.snesdev-page-table', '.pub': 'application/vnd.exstream-package', '.pvb': 'application/vnd.3gpp.pic-bw-var', '.pwn': 'application/vnd.3M.Post-it-Notes', '.pwz': 'application/vnd.ms-powerpoint', '.py': 'text/plain', '.pya': 'audio/vnd.ms-playready.media.pya', '.pyc': 'application/x-python-code', '.pyo': 'application/x-python-code', '.pyox': 'model/vnd.pytha.pyox', '.pyv': 'video/vnd.ms-playready.media.pyv', '.qam': 'application/vnd.epson.quickanime', '.qbo': 'application/vnd.intu.qbo', '.qca': 'application/vnd.ericsson.quickcall', '.qcall': 'application/vnd.ericsson.quickcall', '.qcp': 'audio/EVRC-QCP', '.qfx': 'application/vnd.intu.qfx', '.qgs': 'application/x-qgis', '.qps': 'application/vnd.publishare-delta-tree', '.qt': 'video/quicktime', '.qtl': 'application/x-quicktimeplayer', '.quiz': 'application/vnd.quobject-quoxdocument', '.quox': 'application/vnd.quobject-quoxdocument', '.qvd': 'application/vnd.theqvd', '.qwd': 'application/vnd.Quark.QuarkXPress', '.qwt': 'application/vnd.Quark.QuarkXPress', '.qxb': 'application/vnd.Quark.QuarkXPress', '.qxd': 'application/vnd.Quark.QuarkXPress', '.qxl': 'application/vnd.Quark.QuarkXPress', '.qxt': 'application/vnd.Quark.QuarkXPress', '.ra': 'audio/x-pn-realaudio', '.ram': 'audio/x-pn-realaudio', '.rapd': 'application/route-apd+xml', '.rar': 'application/vnd.rar', '.ras': 'image/x-cmu-raster', '.rb': 'application/x-ruby', '.rcprofile': 'application/vnd.ipunplugged.rcprofile', '.rct': 'application/prs.nprend', '.rd': 'chemical/x-mdl-rdfile', '.rdf': 'application/rdf+xml', '.rdf-crypt': 'application/prs.rdf-xml-crypt', '.rdp': 'application/x-rdp', '.rdz': 'application/vnd.data-vision.rdz', '.relo': 'application/p2p-overlay+xml', '.reload': 'application/vnd.resilient.logic', '.rep': 'application/vnd.businessobjects', '.request': 'application/vnd.nervana', '.rfcxml': 'application/rfc+xml', '.rgb': 'image/x-rgb', '.rgbe': 'image/vnd.radiance', '.rif': 'application/reginfo+xml', '.rip': 'audio/vnd.rip', '.rl': 'application/resource-lists+xml', '.rlc': 'image/vnd.fujixerox.edmics-rlc', '.rld': 'application/resource-lists-diff+xml', '.rlm': 'application/vnd.resilient.logic', '.rm': 'audio/x-pn-realaudio', '.rms': 'application/vnd.jcp.javame.midlet-rms', '.rnc': 'application/relax-ng-compact-syntax', '.rnd': 'application/prs.nprend', '.roa': 'application/rpki-roa', '.roff': 'text/troff', '.ros': 'chemical/x-rosdal', '.rp9': 'application/vnd.cloanto.rp9', '.rpm': 'application/x-redhat-package-manager', '.rpss': 'application/vnd.nokia.radio-presets', '.rpst': 'application/vnd.nokia.radio-preset', '.rq': 'application/sparql-query', '.rs': 'application/rls-services+xml', '.rsat': 'application/atsc-rsat+xml', '.rsheet': 'application/urc-ressheet+xml', '.rsm': 'model/vnd.gdl', '.rss': 'application/x-rss+xml', '.rst': 'text/prs.fallenstein.rst', '.rtf': 'application/rtf', '.rtx': 'text/richtext', '.rusd': 'application/route-usd+xml', '.rxn': 'chemical/x-mdl-rxnfile', '.s11': 'video/vnd.sealed.mpeg1', '.s14': 'video/vnd.sealed.mpeg4', '.s1a': 'application/vnd.sealedmedia.softseal.pdf', '.s1e': 'application/vnd.sealed.xls', '.s1g': 'image/vnd.sealedmedia.softseal.gif', '.s1h': 'application/vnd.sealedmedia.softseal.html', '.s1j': 'image/vnd.sealedmedia.softseal.jpg', '.s1m': 'audio/vnd.sealedmedia.softseal.mpeg', '.s1n': 'image/vnd.sealed.png', '.s1p': 'application/vnd.sealed.ppt', '.s1q': 'video/vnd.sealedmedia.softseal.mov', '.s1w': 'application/vnd.sealed.doc', '.s3df': 'application/vnd.sealed.3df', '.sac': 'application/tamp-sequence-adjust-confirm', '.saf': 'application/vnd.yamaha.smaf-audio', '.sam': 'application/vnd.lotus-wordpro', '.sarif': 'application/sarif+json', '.sarif-external-properties': 'application/sarif-external-properties+json', '.sarif-external-properties.json': 'application/sarif-external-properties+json', '.sarif.json': 'application/sarif+json', '.sc': 'application/vnd.ibm.secure-container', '.scala': 'text/x-scala', '.scd': 'application/vnd.scribus', '.sce': 'application/x-scilab', '.sci': 'application/x-scilab', '.scim': 'application/scim+json', '.scl': 'application/vnd.sycle+xml', '.scld': 'application/vnd.doremir.scorecloud-binary-document', '.scm': 'application/vnd.lotus-screencam', '.sco': 'audio/csound', '.scq': 'application/scvp-cv-request', '.scr': 'application/x-silverlight', '.scs': 'application/scvp-cv-response', '.scsf': 'application/vnd.sealed.csf', '.sd': 'chemical/x-mdl-sdfile', '.sd2': 'audio/x-sd2', '.sda': 'application/vnd.stardivision.draw', '.sdc': 'application/vnd.stardivision.calc', '.sdd': 'application/vnd.stardivision.impress', '.sdf': 'chemical/x-mdl-sdfile', '.sdkd': 'application/vnd.solent.sdkm+xml', '.sdkm': 'application/vnd.solent.sdkm+xml', '.sdo': 'application/vnd.sealed.doc', '.sdoc': 'application/vnd.sealed.doc', '.sdp': 'application/sdp', '.sds': 'application/vnd.stardivision.chart', '.sdw': 'application/vnd.stardivision.writer', '.see': 'application/vnd.seemail', '.seed': 'application/vnd.fdsn.seed', '.sem': 'application/vnd.sealed.eml', '.sema': 'application/vnd.sema', '.semd': 'application/vnd.semd', '.semf': 'application/vnd.semf', '.seml': 'application/vnd.sealed.eml', '.senml': 'application/senml+json', '.senml-etchc': 'application/senml-etch+cbor', '.senml-etchj': 'application/senml-etch+json', '.senmlc': 'application/senml+cbor', '.senmle': 'application/senml-exi', '.senmlx': 'application/senml+xml', '.sensml': 'application/sensml+json', '.sensmlc': 'application/sensml+cbor', '.sensmle': 'application/sensml-exi', '.sensmlx': 'application/sensml+xml', '.ser': 'application/java-serialized-object', '.sfc': 'application/vnd.nintendo.snes.rom', '.sfd': 'application/vnd.font-fontforge-sfd', '.sfd-hdstx': 'application/vnd.hydrostatix.sof-data', '.sfs': 'application/vnd.spotfire.sfs', '.sfv': 'text/x-sfv', '.sgf': 'application/x-go-sgf', '.sgi': 'image/vnd.sealedmedia.softseal.gif', '.sgif': 'image/vnd.sealedmedia.softseal.gif', '.sgl': 'application/vnd.stardivision.writer-global', '.sgm': 'text/SGML', '.sgml': 'text/SGML', '.sh': 'text/x-sh', '.shaclc': 'text/shaclc', '.shar': 'application/x-shar', '.shc': 'text/shaclc', '.shex': 'text/shex', '.shf': 'application/shf+xml', '.shp': 'application/x-qgis', '.shtml': 'text/html', '.shx': 'application/x-qgis', '.si': 'text/vnd.wap.si', '.sic': 'application/vnd.wap.sic', '.sid': 'audio/prs.sid', '.sieve': 'application/sieve', '.sig': 'application/pgp-signature', '.sik': 'application/x-trash', '.silo': 'model/mesh', '.sis': 'application/vnd.symbian.install', '.sit': 'application/x-stuffit', '.sitx': 'application/x-stuffit', '.siv': 'application/sieve', '.sjp': 'image/vnd.sealedmedia.softseal.jpg', '.sjpg': 'image/vnd.sealedmedia.softseal.jpg', '.skd': 'application/vnd.koan', '.skm': 'application/vnd.koan', '.skp': 'application/vnd.koan', '.skt': 'application/vnd.koan', '.sl': 'text/vnd.wap.sl', '.sla': 'application/vnd.scribus', '.slaz': 'application/vnd.scribus', '.slc': 'application/vnd.wap.slc', '.sldm': 'application/vnd.ms-powerpoint.slide.macroEnabled.12', '.sldx': 'application/vnd.openxmlformats-officedocument.presentationml.slide', '.sls': 'application/route-s-tsid+xml', '.slt': 'application/vnd.epson.salt', '.sm': 'application/vnd.stepmania.stepchart', '.smc': 'application/vnd.nintendo.snes.rom', '.smf': 'application/vnd.stardivision.math', '.smh': 'application/vnd.sealed.mht', '.smht': 'application/vnd.sealed.mht', '.smi': 'application/smil+xml', '.smil': 'application/smil+xml', '.smk': 'video/vnd.radgamettools.smacker', '.sml': 'application/smil+xml', '.smo': 'video/vnd.sealedmedia.softseal.mov', '.smov': 'video/vnd.sealedmedia.softseal.mov', '.smp': 'audio/vnd.sealedmedia.softseal.mpeg', '.smp3': 'audio/vnd.sealedmedia.softseal.mpeg', '.smpg': 'video/vnd.sealed.mpeg1', '.sms': 'application/vnd.3gpp2.sms', '.smv': 'audio/SMV', '.smzip': 'application/vnd.stepmania.package', '.snd': 'audio/basic', '.so': 'application/octet-stream', '.soa': 'text/dns', '.soc': 'application/sgml-open-catalog', '.sofa': 'audio/sofa', '.sos': 'text/vnd.sosi', '.spc': 'chemical/x-galactic-spc', '.spd': 'application/vnd.sealedmedia.softseal.pdf', '.spdf': 'application/vnd.sealedmedia.softseal.pdf', '.spdx': 'text/spdx', '.spdx.json': 'application/spdx+json', '.spf': 'application/vnd.yamaha.smaf-phrase', '.spl': 'application/futuresplash', '.spn': 'image/vnd.sealed.png', '.spng': 'image/vnd.sealed.png', '.spo': 'text/vnd.in3d.spot', '.spot': 'text/vnd.in3d.spot', '.spp': 'application/scvp-vp-response', '.sppt': 'application/vnd.sealed.ppt', '.spq': 'application/scvp-vp-request', '.spx': 'audio/ogg', '.sql': 'application/sql', '.sqlite': 'application/vnd.sqlite3', '.sqlite3': 'application/vnd.sqlite3', '.sr': 'application/vnd.sigrok.session', '.src': 'application/x-wais-source', '.srt': 'text/plain', '.sru': 'application/sru+xml', '.srx': 'application/sparql-results+xml', '.sse': 'application/vnd.kodak-descriptor', '.ssf': 'application/vnd.epson.ssf', '.ssml': 'application/ssml+xml', '.ssv': 'application/vnd.shade-save-file', '.ssvc': 'application/vnd.crypto-shade-file', '.ssw': 'video/vnd.sealed.swf', '.sswf': 'video/vnd.sealed.swf', '.st': 'application/vnd.sailingtracker.track', '.stc': 'application/vnd.sun.xml.calc.template', '.std': 'application/vnd.sun.xml.draw.template', '.step': 'model/step', '.stf': 'application/vnd.wt.stf', '.sti': 'application/vnd.sun.xml.impress.template', '.stif': 'application/vnd.sealed.tiff', '.stix': 'application/stix+json', '.stk': 'application/hyperstudio', '.stl': 'model/stl', '.stml': 'application/vnd.sealedmedia.softseal.html', '.stp': 'model/step', '.stpnc': 'application/p21', '.stpx': 'model/step+xml', '.stpxz': 'model/step-xml+zip', '.stpz': 'model/step+zip', '.str': 'application/vnd.pg.format', '.study-inter': 'application/vnd.vd-study', '.stw': 'application/vnd.sun.xml.writer.template', '.sty': 'text/x-tex', '.sus': 'application/vnd.sus-calendar', '.susp': 'application/vnd.sus-calendar', '.sv4cpio': 'application/x-sv4cpio', '.sv4crc': 'application/x-sv4crc', '.svc': 'application/vnd.dvb.service', '.svg': 'image/svg+xml', '.svgz': 'image/svg+xml', '.sw': 'chemical/x-swissprot', '.swf': 'application/vnd.adobe.flash.movie', '.swi': 'application/vnd.aristanetworks.swi', '.swidtag': 'application/swid+xml', '.sxc': 'application/vnd.sun.xml.calc', '.sxd': 'application/vnd.sun.xml.draw', '.sxg': 'application/vnd.sun.xml.writer.global', '.sxi': 'application/vnd.sun.xml.impress', '.sxl': 'application/vnd.sealed.xls', '.sxls': 'application/vnd.sealed.xls', '.sxm': 'application/vnd.sun.xml.math', '.sxw': 'application/vnd.sun.xml.writer', '.syft.json': 'application/vnd.syft+json', '.t': 'text/troff', '.tag': 'text/prs.lines.tag', '.taglet': 'application/vnd.mynfc', '.tam': 'application/vnd.onepager', '.tamp': 'application/vnd.onepagertamp', '.tamx': 'application/vnd.onepagertamx', '.tao': 'application/vnd.tao.intent-module-archive', '.tap': 'image/vnd.tencent.tap', '.tar': 'application/x-tar', '.tat': 'application/vnd.onepagertat', '.tatp': 'application/vnd.onepagertatp', '.tatx': 'application/vnd.onepagertatx', '.tau': 'application/tamp-apex-update', '.taz': 'application/x-gtar-compressed', '.tcap': 'application/vnd.3gpp2.tcap', '.tcl': 'text/x-tcl', '.tcu': 'application/tamp-community-update', '.td': 'application/urc-targetdesc+xml', '.teacher': 'application/vnd.smart.teacher', '.tei': 'application/tei+xml', '.teiCorpus': 'application/tei+xml', '.ter': 'application/tamp-error', '.tex': 'text/x-tex', '.texi': 'application/x-texinfo', '.texinfo': 'application/x-texinfo', '.text': 'text/plain', '.tfi': 'application/thraud+xml', '.tfx': 'image/tiff-fx', '.tgf': 'chemical/x-mdl-tgf', '.tgz': 'application/x-gtar-compressed', '.thmx': 'application/vnd.ms-officetheme', '.tif': 'image/tiff', '.tiff': 'image/tiff', '.tk': 'text/x-tcl', '.tlclient': 'application/vnd.cendio.thinlinc.clientconf', '.tm': 'text/texmacs', '.tmo': 'application/vnd.tmobile-livetv', '.tnef': 'application/vnd.ms-tnef', '.tnf': 'application/vnd.ms-tnef', '.torrent': 'application/x-bittorrent', '.tpl': 'application/vnd.groove-tool-template', '.tpt': 'application/vnd.trid.tpt', '.tr': 'text/troff', '.tra': 'application/vnd.trueapp', '.tree': 'application/vnd.rainstor.data', '.trig': 'application/trig', '.ts': 'text/vnd.trolltech.linguist', '.tsa': 'application/tamp-sequence-adjust', '.tsd': 'application/timestamped-data', '.tsp': 'application/dsptype', '.tsq': 'application/timestamp-query', '.tsr': 'application/timestamp-reply', '.tst': 'application/vnd.etsi.timestamp-token', '.tsv': 'text/tab-separated-values', '.ttc': 'font/collection', '.ttf': 'font/ttf', '.ttl': 'text/turtle', '.ttml': 'application/ttml+xml', '.tuc': 'application/tamp-update-confirm', '.tur': 'application/tamp-update', '.twd': 'application/vnd.SimTech-MindMapper', '.twds': 'application/vnd.SimTech-MindMapper', '.txd': 'application/vnd.genomatix.tuxedo', '.txf': 'application/vnd.Mobius.TXF', '.txt': 'text/plain', '.u3d': 'model/u3d', '.u8dsn': 'message/global-delivery-status', '.u8hdr': 'message/global-headers', '.u8mdn': 'message/global-disposition-notification', '.u8msg': 'message/global', '.udeb': 'application/vnd.debian.binary-package', '.ufd': 'application/vnd.ufdl', '.ufdl': 'application/vnd.ufdl', '.uis': 'application/urc-uisocketdesc+xml', '.umj': 'application/vnd.umajin', '.unityweb': 'application/vnd.unity', '.uo': 'application/vnd.uoml+xml', '.uoml': 'application/vnd.uoml+xml', '.upa': 'application/vnd.hbci', '.uri': 'text/uri-list', '.urim': 'application/vnd.uri-map', '.urimap': 'application/vnd.uri-map', '.uris': 'text/uri-list', '.usdz': 'model/vnd.usdz+zip', '.ustar': 'application/x-ustar', '.utz': 'application/vnd.uiq.theme', '.uva': 'audio/vnd.dece.audio', '.uvd': 'application/vnd.dece.data', '.uvf': 'application/vnd.dece.data', '.uvg': 'image/vnd.dece.graphic', '.uvh': 'video/vnd.dece.hd', '.uvi': 'image/vnd.dece.graphic', '.uvm': 'video/vnd.dece.mobile', '.uvp': 'video/vnd.dece.pd', '.uvs': 'video/vnd.dece.sd', '.uvt': 'application/vnd.dece.ttml+xml', '.uvu': 'video/vnd.dece.mp4', '.uvv': 'video/vnd.dece.video', '.uvva': 'audio/vnd.dece.audio', '.uvvd': 'application/vnd.dece.data', '.uvvf': 'application/vnd.dece.data', '.uvvg': 'image/vnd.dece.graphic', '.uvvh': 'video/vnd.dece.hd', '.uvvi': 'image/vnd.dece.graphic', '.uvvm': 'video/vnd.dece.mobile', '.uvvp': 'video/vnd.dece.pd', '.uvvs': 'video/vnd.dece.sd', '.uvvt': 'application/vnd.dece.ttml+xml', '.uvvu': 'video/vnd.dece.mp4', '.uvvv': 'video/vnd.dece.video', '.uvvx': 'application/vnd.dece.unspecified', '.uvvz': 'application/vnd.dece.zip', '.uvx': 'application/vnd.dece.unspecified', '.uvz': 'application/vnd.dece.zip', '.val': 'chemical/x-ncbi-asn1-binary', '.vbk': 'audio/vnd.nortel.vbk', '.vbox': 'application/vnd.previewsystems.box', '.vcard': 'text/vcard', '.vcd': 'application/x-cdlink', '.vcf': 'text/vcard', '.vcg': 'application/vnd.groove-vcard', '.vcj': 'application/voucher-cms+json', '.vcs': 'text/x-vcalendar', '.vcx': 'application/vnd.vcx', '.vds': 'model/vnd.sap.vds', '.vew': 'application/vnd.lotus-approach', '.vfr': 'application/vnd.tml', '.viaframe': 'application/vnd.tml', '.vis': 'application/vnd.visionary', '.viv': 'video/vnd.vivo', '.vmd': 'chemical/x-vmd', '.vms': 'chemical/x-vamas-iso14976', '.vmt': 'application/vnd.valve.source.material', '.vpm': 'multipart/voice-message', '.vrm': 'model/vrml', '.vrml': 'model/vrml', '.vsc': 'application/vnd.vidsoft.vidconference', '.vsd': 'application/vnd.visio', '.vsf': 'application/vnd.vsf', '.vss': 'application/vnd.visio', '.vst': 'application/vnd.visio', '.vsw': 'application/vnd.visio', '.vtf': 'image/vnd.valve.source.texture', '.vtnstd': 'application/vnd.veritone.aion+json', '.vtt': 'text/vtt', '.vtu': 'model/vnd.vtu', '.vwx': 'application/vnd.vectorworks', '.vxml': 'application/voicexml+xml', '.wad': 'application/x-doom', '.wadl': 'application/vnd.sun.wadl+xml', '.wasm': 'application/wasm', '.wav': 'audio/x-wav', '.wax': 'audio/x-ms-wax', '.wbmp': 'image/vnd.wap.wbmp', '.wbs': 'application/vnd.criticaltools.wbs+xml', '.wbxml': 'application/vnd.wap.wbxml', '.wcm': 'application/vnd.ms-works', '.wdb': 'application/vnd.ms-works', '.webm': 'video/webm', '.webmanifest': 'application/manifest+json', '.wg': 'application/vnd.pmi.widget', '.wgt': 'application/widget', '.wif': 'application/watcherinfo+xml', '.win': 'model/vnd.gdl', '.wiz': 'application/msword', '.wk': 'application/x-123', '.wk1': 'application/vnd.lotus-1-2-3', '.wk3': 'application/vnd.lotus-1-2-3', '.wk4': 'application/vnd.lotus-1-2-3', '.wks': 'application/vnd.ms-works', '.wlnk': 'application/link-format', '.wm': 'video/x-ms-wm', '.wma': 'audio/x-ms-wma', '.wmc': 'application/vnd.wmc', '.wmd': 'application/x-ms-wmd', '.wmf': 'image/wmf', '.wml': 'text/vnd.wap.wml', '.wmlc': 'application/vnd.wap.wmlc', '.wmls': 'text/vnd.wap.wmlscript', '.wmlsc': 'application/vnd.wap.wmlscriptc', '.wmv': 'video/x-ms-wmv', '.wmx': 'video/x-ms-wmx', '.wmz': 'application/x-ms-wmz', '.woff': 'font/woff', '.woff2': 'font/woff2', '.wp5': 'application/vnd.wordperfect5.1', '.wpd': 'application/vnd.wordperfect', '.wpl': 'application/vnd.ms-wpl', '.wps': 'application/vnd.ms-works', '.wqd': 'application/vnd.wqd', '.wrl': 'model/vrml', '.wsc': 'application/vnd.wfa.wsc', '.wsdl': 'application/wsdl+xml', '.wspolicy': 'application/wspolicy+xml', '.wtb': 'application/vnd.webturbo', '.wv': 'application/vnd.wv.csp+wbxml', '.wvx': 'video/x-ms-wvx', '.wz': 'application/x-wingz', '.x3d': 'model/x3d+xml', '.x3db': 'model/x3d+fastinfoset', '.x3dv': 'model/x3d-vrml', '.x3dvz': 'model/x3d-vrml', '.x3dz': 'model/x3d+xml', '.x_b': 'model/vnd.parasolid.transmit.binary', '.x_t': 'model/vnd.parasolid.transmit.text', '.xar': 'application/vnd.xara', '.xav': 'application/xcap-att+xml', '.xbd': 'application/vnd.fujixerox.docuworks.binder', '.xbm': 'image/x-xbitmap', '.xca': 'application/xcap-caps+xml', '.xcf': 'image/x-xcf', '.xcos': 'application/x-scilab-xcos', '.xcs': 'application/calendar+xml', '.xct': 'application/vnd.fujixerox.docuworks.container', '.xdd': 'application/bacnet-xdd+zip', '.xdf': 'application/xcap-diff+xml', '.xdm': 'application/vnd.syncml.dm+xml', '.xdp': 'application/vnd.adobe.xdp+xml', '.xdssc': 'application/dssc+xml', '.xdw': 'application/vnd.fujixerox.docuworks', '.xel': 'application/xcap-el+xml', '.xer': 'application/xcap-error+xml', '.xfd': 'application/vnd.xfdl', '.xfdf': 'application/vnd.adobe.xfdf', '.xfdl': 'application/vnd.xfdl', '.xhe': 'audio/usac', '.xht': 'application/xhtml+xml', '.xhtm': 'application/xhtml+xml', '.xhtml': 'application/xhtml+xml', '.xhvml': 'application/xv+xml', '.xif': 'image/vnd.xiff', '.xla': 'application/vnd.ms-excel', '.xlam': 'application/vnd.ms-excel.addin.macroEnabled.12', '.xlb': 'application/vnd.ms-excel', '.xlc': 'application/vnd.ms-excel', '.xlf': 'application/xliff+xml', '.xlim': 'application/vnd.xmpie.xlim', '.xlm': 'application/vnd.ms-excel', '.xls': 'application/vnd.ms-excel', '.xlsb': 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', '.xlsm': 'application/vnd.ms-excel.sheet.macroEnabled.12', '.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', '.xlt': 'application/vnd.ms-excel', '.xltm': 'application/vnd.ms-excel.template.macroEnabled.12', '.xltx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', '.xlw': 'application/vnd.ms-excel', '.xml': 'application/xml', '.xmls': 'application/dskpp+xml', '.xmt_bin': 'model/vnd.parasolid.transmit.binary', '.xmt_txt': 'model/vnd.parasolid.transmit.text', '.xns': 'application/xcap-ns+xml', '.xo': 'application/vnd.olpc-sugar', '.xodp': 'application/vnd.collabio.xodocuments.presentation', '.xods': 'application/vnd.collabio.xodocuments.spreadsheet', '.xodt': 'application/vnd.collabio.xodocuments.document', '.xop': 'application/xop+xml', '.xotp': 'application/vnd.collabio.xodocuments.presentation-template', '.xots': 'application/vnd.collabio.xodocuments.spreadsheet-template', '.xott': 'application/vnd.collabio.xodocuments.document-template', '.xpdl': 'application/xml', '.xpi': 'application/x-xpinstall', '.xpm': 'image/x-xpixmap', '.xpr': 'application/vnd.is-xpr', '.xps': 'application/vnd.ms-xpsdocument', '.xpw': 'application/vnd.intercon.formnet', '.xpx': 'application/vnd.intercon.formnet', '.xsf': 'application/prs.xsf+xml', '.xsl': 'application/xslt+xml', '.xslt': 'application/xslt+xml', '.xsm': 'application/vnd.syncml+xml', '.xspf': 'application/xspf+xml', '.xtel': 'chemical/x-xtel', '.xul': 'application/vnd.mozilla.xul+xml', '.xvm': 'application/xv+xml', '.xvml': 'application/xv+xml', '.xwd': 'image/x-xwindowdump', '.xyz': 'chemical/x-xyz', '.xyze': 'image/vnd.radiance', '.xz': 'application/x-xz', '.yang': 'application/yang', '.yin': 'application/yin+xml', '.yme': 'application/vnd.yaoweme', '.yt': 'video/vnd.youtube.yt', '.zaz': 'application/vnd.zzazz.deck+xml', '.zfc': 'application/vnd.filmit.zfc', '.zfo': 'application/vnd.software602.filler.form-xml-zip', '.zip': 'application/zip', '.zir': 'application/vnd.zul', '.zirz': 'application/vnd.zul', '.zmm': 'application/vnd.HandHeld-Entertainment+xml', '.zmt': 'chemical/x-mopac-input', '.zone': 'text/dns', '.zst': 'application/zstd', '.~': 'application/x-trash'}
guess_type(path)

Guess the type of a file.

Argument is a PATH (a filename).

Return value is a string of the form type/subtype, usable for a MIME Content-type header.

The default implementation looks the file's extension up in the table self.extensions_map, using application/octet-stream as a default; however it would be permissible (if slow) to look inside the data to make a better guess.

list_directory(path)

Helper to produce a directory listing (absent index.html).

Return value is either a file object, or None (indicating an error). In either case, the headers are sent, making the interface the same as for send_head().

send_head()

Common code for GET and HEAD commands.

This sends the response code and MIME headers.

Return value is either a file object (which has to be copied to the outputfile by the caller unless the command was HEAD, and must be closed by the caller under all circumstances), or None, in which case the caller has nothing further to do.

server_version = 'SimpleHTTP/0.6'
translate_path(path)

Translate a /-separated PATH to the local filename syntax.

Components that mean special things to the local file system (e.g. drive or directory names) are ignored. (XXX They should probably be diagnosed.)

Module contents

class eventlet.green.http.HTTPStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

基类:IntEnum

HTTP status codes and reason phrases

Status codes from the following RFCs are all observed:

  • RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616

  • RFC 6585: Additional HTTP Status Codes

  • RFC 3229: Delta encoding in HTTP

  • RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518

  • RFC 5842: Binding Extensions to WebDAV

  • RFC 7238: Permanent Redirect

  • RFC 2295: Transparent Content Negotiation in HTTP

  • RFC 2774: An HTTP Extension Framework

ACCEPTED = 202
ALREADY_REPORTED = 208
BAD_GATEWAY = 502
BAD_REQUEST = 400
CONFLICT = 409
CONTINUE = 100
CREATED = 201
EXPECTATION_FAILED = 417
FAILED_DEPENDENCY = 424
FORBIDDEN = 403
FOUND = 302
GATEWAY_TIMEOUT = 504
GONE = 410
HTTP_VERSION_NOT_SUPPORTED = 505
IM_USED = 226
INSUFFICIENT_STORAGE = 507
INTERNAL_SERVER_ERROR = 500
LENGTH_REQUIRED = 411
LOCKED = 423
LOOP_DETECTED = 508
METHOD_NOT_ALLOWED = 405
MOVED_PERMANENTLY = 301
MULTIPLE_CHOICES = 300
MULTI_STATUS = 207
NETWORK_AUTHENTICATION_REQUIRED = 511
NON_AUTHORITATIVE_INFORMATION = 203
NOT_ACCEPTABLE = 406
NOT_EXTENDED = 510
NOT_FOUND = 404
NOT_IMPLEMENTED = 501
NOT_MODIFIED = 304
NO_CONTENT = 204
OK = 200
PARTIAL_CONTENT = 206
PAYMENT_REQUIRED = 402
PERMANENT_REDIRECT = 308
PRECONDITION_FAILED = 412
PRECONDITION_REQUIRED = 428
PROCESSING = 102
PROXY_AUTHENTICATION_REQUIRED = 407
REQUESTED_RANGE_NOT_SATISFIABLE = 416
REQUEST_ENTITY_TOO_LARGE = 413
REQUEST_HEADER_FIELDS_TOO_LARGE = 431
REQUEST_TIMEOUT = 408
REQUEST_URI_TOO_LONG = 414
RESET_CONTENT = 205
SEE_OTHER = 303
SERVICE_UNAVAILABLE = 503
SWITCHING_PROTOCOLS = 101
TEMPORARY_REDIRECT = 307
TOO_MANY_REQUESTS = 429
UNAUTHORIZED = 401
UNPROCESSABLE_ENTITY = 422
UNSUPPORTED_MEDIA_TYPE = 415
UPGRADE_REQUIRED = 426
USE_PROXY = 305
VARIANT_ALSO_NEGOTIATES = 506