Package DebTorrent :: Module HTTPHandler
[hide private]
[frames] | no frames]

Module HTTPHandler

source code

Handles incoming HTTP connections from other clients to this server.

Classes [hide private]
  HTTPRequest
A single request on an HTTP connection.
  HTTPConnection
A single connection from an HTTP client.
  HTTPHandler
The handler for all new and existing HTTP connections.
Functions [hide private]
string
isotime(secs=None)
Create an ISO formatted string of the time.
source code
Variables [hide private]
logging.Logger logger = logging.getLogger('DebTorrent.HTTPHandler')
the logger to send all log messages to for this module
list of string weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
the days of the week
list of string months = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul...
the months of the year
  DEBTORRENT_PROTOCOL = '0.1'

Imports: cStringIO.StringIO, sys.stdout, sys.exc_info, time, clock.clock, gzip.GzipFile, signal, logging


Function Details [hide private]

isotime(secs=None)

source code 
Create an ISO formatted string of the time.
Parameters:
  • secs (float) - number of seconds since the epoch (optional, default is to use the current time)
Returns: string
the ISO formatted string representation of the time

Variables Details [hide private]

months

the months of the year
Type:
list of string
Value:
[None,
 'Jan',
 'Feb',
 'Mar',
 'Apr',
 'May',
 'Jun',
 'Jul',
...