Package shttp :: Module sHTTP
[hide private]
[frames] | no frames]

Module sHTTP

source code

HTTP package provides a Server and Client (minimal) implementations of the HTTP protocol. Both, server and client, can convert any socket into server or client respectively. The server obtain handlers to methods (GET, POST, etc) and help on most commonly used functions

Classes [hide private]
  HTTPStopServer
  HTTPError
  HTTPUnexpectedStatus
  HTTPBadRequest
  HTTPNullRequest
  HTTPBadResponse
  HTTPBadHeader
  HTTPFileNotFound
  HTTPResolverError
  HTTPURIHandler
  HTTPBase
Common code to HTTP client and HTTP server
  HTTP
The light weight HTTP Server
  HTTPClient
The HTTP Client
Variables [hide private]
  warn = warn.Warn("shttp.sHTTP")
  socket_SHUT_RDWR = 2
  _USE_SELECT = True
  __doc__ = ...
  HTTPNewline = '\r\n'
  HTTPHead = re.compile(r'^(\S+):\s*([^\r]+)\s*$')
  HTTPRequest = re.compile(r'^(\S+)\s+(\S+)\s+([^\r\n]+)')
  HTTPVersion = 'HTTP/1.1'
  HTTPBlankline = re.compile(r'^\s*$')
  responses = {100: ('Continue', 'Request received, please conti...
  HTTPMessage = '%s %d %s\r\nContent-Type: text/plain\r\nContent...
  __warningregistry__ = {('The sre module is deprecated, please ...
Variables Details [hide private]

__doc__

Value:
"""
HTTP package provides a Server and Client (minimal) implementations of\
 the HTTP
protocol. Both, server and client, can convert any socket into server \
or client
respectively. The server obtain handlers to methods (GET, POST, etc) a\
nd
help on most commonly used functions """

responses

Value:
{100: ('Continue', 'Request received, please continue'),
 101: ('Switching Protocols',
       'Switching to new protocol; obey Upgrade header'),
 200: ('OK', 'Request fulfilled, document follows'),
 201: ('Created', 'Document created, URL follows'),
 202: ('Accepted', 'Request accepted, processing continues off-line'),
 203: ('Non-Authoritative Information',
       'Request fulfilled from cache'),
...

HTTPMessage

Value:
'''%s %d %s\r
Content-Type: text/plain\r
Content-Length: 0\r
'''

__warningregistry__

Value:
{('The sre module is deprecated, please import re.',
  <type 'exceptions.DeprecationWarning'>,
  25): 1}