;
"Ic               @   s  d  Z  d d l Z d d l Z d d l Z d d l Z d d l m Z d d l Z d d d d d d	 d
 d d d d d d d d d g Z	 d Z
 d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d  Z d! Z d" Z d# Z d$ Z d% Z d& Z d' Z d( Z d) Z d* Z  d+ Z! d, Z" d- Z# d. Z$ d/ Z% d0 Z& d1 Z' d2 Z( d3 Z) d4 Z* d5 Z+ d6 Z, d7 Z- d8 Z. d9 Z/ d: Z0 d; Z1 d< Z2 d= Z3 d> Z4 d? Z5 d@ Z6 dA Z7 dB Z8 dC Z9 dD Z: dE Z; dF Z< dG Z= dH Z> dI Z? dJ Z@ i) dK d 6dL d 6dM d 6dN d 6dO d 6dP d  6dQ d! 6dR d" 6dS d# 6dT d& 6dU d' 6dV d( 6dW d) 6dX d* 6dY d+ 6dZ d[ 6d\ d, 6d] d- 6d^ d. 6d_ d/ 6d` d0 6da d1 6db d2 6dc d3 6dd d4 6de d5 6df d6 6dg d7 6dh d8 6di d9 6dj d: 6dk d; 6dl d< 6dm d= 6dn d> 6do dC 6dp dD 6dq dE 6dr dF 6ds dG 6dt dH 6ZA du ZB Gdv   dw e jC jD  ZE dx   ZF Gdy   d  ZG Gdz   d  ZH y d d lI ZI Wn eJ k
 o Yn+ XGd{   d| eH  ZK d}   ZL e	 jM d|  Gd~   d eN  ZO Gd   d eO  ZP Gd   d eO  ZQ Gd   d eO  ZR Gd   d	 eO  ZS Gd   d
 eO  ZT Gd   d eO  ZU Gd   d eO  ZV Gd   d eV  ZW Gd   d eV  ZX Gd   d eV  ZY Gd   d eO  ZZ eO Z[ Gd   d  Z\ d S(   u	  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
      |
      | response = getresponse()
      v
    Unread-response   [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>
i    N(   u   urlsplitu   HTTPResponseu   HTTPConnectionu   HTTPExceptionu   NotConnectedu   UnknownProtocolu   UnknownTransferEncodingu   UnimplementedFileModeu   IncompleteReadu
   InvalidURLu   ImproperConnectionStateu   CannotSendRequestu   CannotSendHeaderu   ResponseNotReadyu   BadStatusLineu   erroru	   responsesiP   i  u   UNKNOWNu   Idleu   Request-startedu   Request-sentid   ie   if   i   i   i   i   i   i   i   i   i   i,  i-  i.  i/  i0  i1  i3  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  u   Continueu   Switching Protocolsu   OKu   Createdu   Acceptedu   Non-Authoritative Informationu
   No Contentu   Reset Contentu   Partial Contentu   Multiple Choicesu   Moved Permanentlyu   Foundu	   See Otheru   Not Modifiedu	   Use Proxyu   (Unused)i2  u   Temporary Redirectu   Bad Requestu   Unauthorizedu   Payment Requiredu	   Forbiddenu	   Not Foundu   Method Not Allowedu   Not Acceptableu   Proxy Authentication Requiredu   Request Timeoutu   Conflictu   Goneu   Length Requiredu   Precondition Failedu   Request Entity Too Largeu   Request-URI Too Longu   Unsupported Media Typeu   Requested Range Not Satisfiableu   Expectation Failedu   Internal Server Erroru   Not Implementedu   Bad Gatewayu   Service Unavailableu   Gateway Timeoutu   HTTP Version Not Supportedi   c             B   s   |  Ee  Z d    Z d S(   c             C   s   | j    d } t |  } g  } d } xt |  j   D]f } | d |  j    | k o
 d } n" | d d  j   p
 d } n | o | j |  q5 q5 W| S(   u  Find all header lines matching a given header name.

        Look through the list of headers and find all lines matching a given
        header name (and their continuation lines).  A list of the lines is
        returned, without interpretation.  If the header does not occur, an
        empty list is returned.  If the header occurs multiple times, all
        occurrences are returned.  Case is not important in the header name.

        u   :i    Ni   (   u   loweru   lenu   keysu   isspaceu   append(   u   selfu   nameu   nu   lstu   hitu   line(    (    u(   /mit/python/lib/python3.0/http/client.pyu   getallmatchingheaders   s     

N(   u   __name__u
   __module__u   getallmatchingheaders(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   HTTPMessage   s   
u   HTTPMessagec             C   sk   g  } x. |  j    } | j |  | d k o Pq	 q	 d j |  j d  } t j j d t  j |  S(   uG  Parses only RFC2822 headers from a file pointer.

    email Parser wants to see strings rather than bytes.
    But a TextIOWrapper around self.rfile would buffer too many bytes
    from the stream, bytes which we later need to read as bytes.
    So we read the correct bytes here, as bytes, for email Parser
    to parse.

    s   
s   
s    u
   iso-8859-1u   _class(   s   
s   
s    (	   u   readlineu   appendu   joinu   decodeu   emailu   parseru   Parseru   HTTPMessageu   parsestr(   u   fpu   headersu   lineu   hstring(    (    u(   /mit/python/lib/python3.0/http/client.pyu   parse_headers   s    c             B   s   |  Ee  Z d  d  d d  Z d   Z d   Z d   Z d   Z e d    Z	 d   Z
 d   Z d d	  Z d
   Z d   Z d d  Z d   Z d S(   i    c             C   s|   | j  d d  |  _ | |  _ | |  _ | |  _ d  |  _ t |  _ t |  _	 t |  _
 t |  _ t |  _ t |  _ t |  _ d  S(   Nu   rbi    (   u   makefileu   fpu
   debuglevelu   strictu   _methodu   Noneu   msgu   _UNKNOWNu   versionu   statusu   reasonu   chunkedu
   chunk_leftu   lengthu
   will_close(   u   selfu   socku
   debuglevelu   strictu   method(    (    u(   /mit/python/lib/python3.0/http/client.pyu   __init__  s    										c             C   s  t  |  j j   d  } |  j d k o t d t |   n | p t |   n y | j d  d  \ } } } WnS t	 k
 oG y" | j d  d  \ } } d } Wn t	 k
 o d } Yn XYn X| j
 d  pJ |  j o |  j   t |   q%t t | d  |  j  |  _ d Sn y: t |  } | d k  p | d k o t |   n Wn  t	 k
 o t |   Yn X| | | f S(   Nu
   iso-8859-1i    u   reply:i   i   u    u   HTTP/u   asciiu   HTTP/0.9i   id   i  (   u   HTTP/0.9i   u    (   u   stru   fpu   readlineu
   debuglevelu   printu   repru   BadStatusLineu   splitu   Noneu
   ValueErroru
   startswithu   strictu   closeu   LineAndFileWrapperu   bytesu   int(   u   selfu   lineu   versionu   statusu   reason(    (    u(   /mit/python/lib/python3.0/http/client.pyu   _read_status$  s4    


c             C   s  |  j  d  k	 o d  Sxr |  j   \ } } } | t k o Pn xE |  j j   j   } | p Pn |  j d k o t d |  qB qB q | |  _	 | j   |  _
 | d k o d |  _ nD | j d  o d |  _ n' | d k o d |  _ n t |   |  j d k o2 d  |  _ d |  _ d	 |  _ t j d
  |  _  d  St |  j  |  _  |  j d k o+ x( |  j  D] } t d | d d qmWn |  j  j d  } | o) | j   d k o d	 |  _ d  |  _ n
 d |  _ |  j   |  _ d  |  _ |  j  j d  } |  j  j d  } | o_ |  j oT y t |  |  _ Wn t k
 o d  |  _ YqX|  j d k  o d  |  _ qn
 d  |  _ | t k p; | t k p. d | k o
 d k  n p |  j d k o d |  _ n |  j o( |  j o |  j d  k o d	 |  _ n d  S(   Ni    u   header:u   HTTP/1.0i
   u   HTTP/1.i   u   HTTP/0.9i	   i   u    u   endu    u   transfer-encodingu   chunkedu   content-lengthid   i   u   HEAD(   u   msgu   Noneu   _read_statusu   CONTINUEu   fpu   readlineu   stripu
   debuglevelu   printu   statusu   reasonu   versionu
   startswithu   UnknownProtocolu   lengthu   chunkedu
   will_closeu   emailu   message_from_stringu   parse_headersu   getu   loweru
   chunk_leftu   _check_closeu   intu
   ValueErroru
   NO_CONTENTu   NOT_MODIFIEDu   _method(   u   selfu   versionu   statusu   reasonu   skipu   hdru   tr_encu   length(    (    u(   /mit/python/lib/python3.0/http/client.pyu   beginK  sr    				
 				c             C   s   |  j  j d  } |  j d k o6 |  j  j d  } | o d | j   k o d Sd S|  j  j d  o d S| o d | j   k o d S|  j  j d  } | o d | j   k o d Sd S(   Nu
   connectioni   u   closeu
   keep-aliveu   proxy-connectionTF(   u   msgu   getu   versionu   loweru   Trueu   False(   u   selfu   connu   pconn(    (    u(   /mit/python/lib/python3.0/http/client.pyu   _check_close  s    c             C   s(   |  j  o |  j  j   d  |  _  n d  S(   N(   u   fpu   closeu   None(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu   close  s    
c             C   s
   |  j    S(   N(   u   isclosed(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu   closed  s    c             C   s   |  j  j   d  S(   N(   u   fpu   flush(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu   flush  s    c             C   s   |  j  d  k S(   N(   u   fpu   None(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu   isclosed  s    c             C   s  |  j  d  k o d S|  j o |  j |  S| d  k oM |  j d  k o |  j  j   } n |  j |  j  } d |  _ |  j   | S|  j d  k	 o! | |  j k o |  j } q n |  j  j |  } |  j d  k	 o1 |  j t |  8_ |  j p |  j   qn | S(   Ns    i    (	   u   fpu   Noneu   chunkedu   _read_chunkedu   lengthu   readu
   _safe_readu   closeu   len(   u   selfu   amtu   s(    (    u(   /mit/python/lib/python3.0/http/client.pyu   read  s(    
	

c          	   C   s  |  j  } d } xf| d  k o |  j j   } | j d  } | d k o | d  |  } n y t | d  } Wn* t k
 o |  j   t |   Yn X| d k o Pq n | d  k o | |  j	 |  7} n | | k  o% | |  j	 |  7} | | |  _  | S| | k o. | |  j	 |  7} |  j	 d  d  |  _  | S| |  j	 |  7} | | 8} |  j	 d  d  } q x0 |  j j   } | p Pn | d k o Pq{q{|  j   | S(   Ns    s   ;i    i   i   s   
(
   u
   chunk_leftu   Noneu   fpu   readlineu   findu   intu
   ValueErroru   closeu   IncompleteReadu
   _safe_read(   u   selfu   amtu
   chunk_leftu   valueu   lineu   i(    (    u(   /mit/python/lib/python3.0/http/client.pyu   _read_chunked  sL    	
		
	
c             C   sw   g  } xa | d k oS |  j  j t | t   } | p t |   n | j |  | t |  8} q	 Wd j |  S(   uV  Read the number of bytes requested, compensating for partial reads.

        Normally, we have a blocking socket, but a read() can be interrupted
        by a signal (resulting in a partial read).

        Note that we cannot distinguish between EOF and an interrupt when zero
        bytes have been read. IncompleteRead() will be raised in this
        situation.

        This function should be used when <amt> bytes "should" be present for
        reading. If the bytes are truly not available (due to EOF), then the
        IncompleteRead exception can be used to detect the problem.
        i    s    (   u   fpu   readu   minu	   MAXAMOUNTu   IncompleteReadu   appendu   lenu   join(   u   selfu   amtu   su   chunk(    (    u(   /mit/python/lib/python3.0/http/client.pyu
   _safe_read5  s     c             C   s9   |  j  d  k o t    n d j |  j  j | |   S(   Nu   , (   u   msgu   Noneu   ResponseNotReadyu   joinu   get_all(   u   selfu   nameu   default(    (    u(   /mit/python/lib/python3.0/http/client.pyu	   getheaderL  s    c             C   s0   |  j  d k o t    n t |  j  j    S(   u&   Return list of (header, value) tuples.N(   u   msgu   Noneu   ResponseNotReadyu   listu   items(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu
   getheadersQ  s    N(   u   __name__u
   __module__u   Noneu   __init__u   _read_statusu   beginu   _check_closeu   closeu   propertyu   closedu   flushu   isclosedu   readu   _read_chunkedu
   _safe_readu	   getheaderu
   getheaders(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   HTTPResponse   s   
	'	U		
		 	9	c             B   s   |  Ee  Z d  Z d Z e Z e Z d Z d Z	 d Z
 d d e j d  Z d   Z d   Z d   Z d   Z d	   Z d
   Z d   Z d d d  Z d   Z d   Z d i  d  Z d   Z d   Z d S(   i   u   HTTP/1.1i   i    c             C   sd   | |  _  d  |  _ g  |  _ d  |  _ t |  _ d  |  _ |  j | |  | d  k	 o | |  _	 n d  S(   N(
   u   timeoutu   Noneu   socku   _bufferu   _HTTPConnection__responseu   _CS_IDLEu   _HTTPConnection__stateu   _methodu   _set_hostportu   strict(   u   selfu   hostu   portu   strictu   timeout(    (    u(   /mit/python/lib/python3.0/http/client.pyu   __init__c  s    						c          
   C   s   | d  k o | j d  } | j d  } | | k og y t | | d d    } Wn2 t k
 o& t d | | d d     Yn X| d  |  } n
 |  j } | o6 | d d k o% | d d k o | d d  } q n | |  _ | |  _ d  S(   Nu   :u   ]i   u   nonnumeric port: '%s'i    u   [i(   u   Noneu   rfindu   intu
   ValueErroru
   InvalidURLu   default_portu   hostu   port(   u   selfu   hostu   portu   iu   j(    (    u(   /mit/python/lib/python3.0/http/client.pyu   _set_hostportp  s    $	)	c             C   s   | |  _  d  S(   N(   u
   debuglevel(   u   selfu   level(    (    u(   /mit/python/lib/python3.0/http/client.pyu   set_debuglevel  s    c             C   s(   t  j |  j |  j f |  j  |  _ d S(   u3   Connect to the host and port specified in __init__.N(   u   socketu   create_connectionu   hostu   portu   timeoutu   sock(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu   connect  s    c             C   sU   |  j  o |  j  j   d |  _  n |  j o |  j j   d |  _ n t |  _ d S(   u(   Close the connection to the HTTP server.N(   u   socku   closeu   Noneu   _HTTPConnection__responseu   _CS_IDLEu   _HTTPConnection__state(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu   close  s    

c             C   s;  |  j  d k o% |  j o |  j   q5 t    n |  j d k o t d t |   n y d } t | d  o_ |  j d k o t d  n | j	 |  } x? | o# |  j  j
 |  | j	 |  } q Wn |  j  j
 |  WnO t j k
 o@ } z* | j d d k o |  j   n   WYd d } ~ Xn Xd S(   u   Send `str' to the server.i    u   send:i    u   readu   sendIng a read()ablei    N(   u   socku   Noneu	   auto_openu   connectu   NotConnectedu
   debuglevelu   printu   repru   hasattru   readu   sendallu   socketu   erroru   argsu   close(   u   selfu   stru	   blocksizeu   datau   v(    (    u(   /mit/python/lib/python3.0/http/client.pyu   send  s*    
  c             C   s   |  j  j |  d S(   uu   Add a line of output to the current request buffer.

        Assumes that the line does *not* end with \r\n.
        N(   u   _bufferu   append(   u   selfu   s(    (    u(   /mit/python/lib/python3.0/http/client.pyu   _output  s    c             C   sC   |  j  j d  d j |  j   } |  j  d d  =|  j |  d S(   up   Send the currently buffered request and clear the buffer.

        Appends an extra \r\n to the buffer.
        s    s   
N(   s    s    (   u   _bufferu   extendu   joinu   send(   u   selfu   msg(    (    u(   /mit/python/lib/python3.0/http/client.pyu   _send_output  s    c       
      C   s  |  j  o |  j  j   o d |  _  n |  j t k o t |  _ n
 t    | |  _ | p
 d } n d | | |  j f } |  j	 | j
 d   |  j d k oE| pd } | j d  o t |  \ } } } } } n | oM y | j
 d  } Wn# t k
 o | j
 d  } Yn X|  j d |  qy |  j j
 d  }	 Wn& t k
 o |  j j
 d  }	 Yn X|  j |  j k o |  j d |	  q|	 j d  }	 |  j d d	 |	 |  j f  n | p |  j d
 d  qn d S(   u`  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
        u   /u   %s %s %su   asciii   u    u   httpu   idnau   Hostu   %s:%su   Accept-Encodingu   identityN(   u   _HTTPConnection__responseu   isclosedu   Noneu   _HTTPConnection__stateu   _CS_IDLEu   _CS_REQ_STARTEDu   CannotSendRequestu   _methodu   _http_vsn_stru   _outputu   encodeu	   _http_vsnu
   startswithu   urlsplitu   UnicodeEncodeErroru	   putheaderu   hostu   portu   default_portu   decode(
   u   selfu   methodu   urlu	   skip_hostu   skip_accept_encodingu   requestu   netlocu   nilu
   netloc_encu   host_enc(    (    u(   /mit/python/lib/python3.0/http/client.pyu
   putrequest  s@    		
!
c             C   s   |  j  t k o t    n t | d  o | j d  } n t | d  o | j d  } n | d | } |  j |  d S(   uk   Send a request header line to the server.

        For example: h.putheader('Accept', 'text/html')
        u   encodeu   asciis   : N(   u   _HTTPConnection__stateu   _CS_REQ_STARTEDu   CannotSendHeaderu   hasattru   encodeu   _output(   u   selfu   headeru   value(    (    u(   /mit/python/lib/python3.0/http/client.pyu	   putheader/  s    c             C   s4   |  j  t k o t |  _  n
 t    |  j   d S(   u?   Indicate that the last header line has been sent to the server.N(   u   _HTTPConnection__stateu   _CS_REQ_STARTEDu   _CS_REQ_SENTu   CannotSendHeaderu   _send_output(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu
   endheaders>  s    	c             C   s   y |  j  | | | |  Wnf t j k
 oW } zA | j d d k p |  j o   n |  j  | | | |  WYd d } ~ Xn Xd S(   u&   Send a complete request to the server.i    i    N(   u   _send_requestu   socketu   erroru   argsu	   auto_open(   u   selfu   methodu   urlu   bodyu   headersu   v(    (    u(   /mit/python/lib/python3.0/http/client.pyu   requestH  s    c             C   s  t  j d   | D  } i  } d | k o d | d <n d | k o d | d <n |  j | | |  | o d | k o d  } y t t |   } Wn t k
 o } zn d d  l }	 y" t |	 j | j	    j
  } Wn8 t t f k
 o& |  j d k o t d	  n Yn XWYd  d  } ~ Xn X| d  k	 o |  j d
 |  qPn x* | j   D] \ }
 } |  j |
 |  q]W|  j   | o4 t | t  o | j d  } n |  j |  n d  S(   Nc             S   s!   g  } |  ] } | | j    q
 S(    (   u   lower(   u   .0u   _[1]u   k(    (    u(   /mit/python/lib/python3.0/http/client.pyu
   <listcomp>U  s    u   hosti   u	   skip_hostu   accept-encodingu   skip_accept_encodingu   content-lengthi    u   Cannot stat!!u   Content-Lengthu   ascii(   u   dictu   fromkeysu
   putrequestu   Noneu   stru   lenu	   TypeErroru   osu   fstatu   filenou   st_sizeu   AttributeErroru   OSErroru
   debuglevelu   printu	   putheaderu   itemsu
   endheadersu
   isinstanceu   encodeu   send(   u   selfu   methodu   urlu   bodyu   headersu   header_namesu   skipsu   thelenu   teu   osu   hdru   value(    (    u(   /mit/python/lib/python3.0/http/client.pyu   _send_requestS  s8    " ( 
 c             C   s   |  j  o |  j  j   o d |  _  n |  j t k p
 |  j  o t    n |  j d k o. |  j |  j |  j d |  j	 d |  j
 } n% |  j |  j d |  j	 d |  j
 } | j   t |  _ | j o |  j   n
 | |  _  | S(   u!   Get the response from the server.i    u   strictu   methodN(   u   _HTTPConnection__responseu   isclosedu   Noneu   _HTTPConnection__stateu   _CS_REQ_SENTu   ResponseNotReadyu
   debuglevelu   response_classu   socku   strictu   _methodu   beginu   _CS_IDLEu
   will_closeu   close(   u   selfu   response(    (    u(   /mit/python/lib/python3.0/http/client.pyu   getresponsev  s     	
	
	N(   u   __name__u
   __module__u	   _http_vsnu   _http_vsn_stru   HTTPResponseu   response_classu	   HTTP_PORTu   default_portu	   auto_openu
   debuglevelu   strictu   Noneu   socketu   _GLOBAL_DEFAULT_TIMEOUTu   __init__u   _set_hostportu   set_debuglevelu   connectu   closeu   sendu   _outputu   _send_outputu
   putrequestu	   putheaderu
   endheadersu   requestu   _send_requestu   getresponse(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   HTTPConnectionX  s,   
				
			
m		
	#c             B   s>   |  Ee  Z d  Z e Z d d d d e j d  Z d   Z	 d S(   u(   This class allows communication via SSL.c             C   s/   t  j |  | | | |  | |  _ | |  _ d  S(   N(   u   HTTPConnectionu   __init__u   key_fileu	   cert_file(   u   selfu   hostu   portu   key_fileu	   cert_fileu   strictu   timeout(    (    u(   /mit/python/lib/python3.0/http/client.pyu   __init__  s    	c             C   sC   t  j |  j |  j f |  j  } t j | |  j |  j  |  _	 d S(   u(   Connect to a host on a given (SSL) port.N(
   u   socketu   create_connectionu   hostu   portu   timeoutu   sslu   wrap_socketu   key_fileu	   cert_fileu   sock(   u   selfu   sock(    (    u(   /mit/python/lib/python3.0/http/client.pyu   connect  s    !N(
   u   __name__u
   __module__u   __doc__u
   HTTPS_PORTu   default_portu   Noneu   socketu   _GLOBAL_DEFAULT_TIMEOUTu   __init__u   connect(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   HTTPSConnection  s
   
	u   HTTPSConnectionc             C   s   t  j d d t d d | S(   Nu0   FakeSocket is deprecated, and won't be in 3.x.  u5   Use the result of ssl.wrap_socket() directly instead.u
   stackleveli   (   u   warningsu   warnu   DeprecationWarning(   u   socku   sslobj(    (    u(   /mit/python/lib/python3.0/http/client.pyu
   FakeSocket  s    	c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   HTTPException  s   
c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   NotConnected  s   
c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu
   InvalidURL  s   
c             B   s   |  Ee  Z d    Z d S(   c             C   s   | f |  _  | |  _ d  S(   N(   u   argsu   version(   u   selfu   version(    (    u(   /mit/python/lib/python3.0/http/client.pyu   __init__  s    N(   u   __name__u
   __module__u   __init__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   UnknownProtocol  s   
c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   UnknownTransferEncoding  s   
c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   UnimplementedFileMode  s   
c             B   s   |  Ee  Z d    Z d S(   c             C   s   | f |  _  | |  _ d  S(   N(   u   argsu   partial(   u   selfu   partial(    (    u(   /mit/python/lib/python3.0/http/client.pyu   __init__  s    N(   u   __name__u
   __module__u   __init__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   IncompleteRead  s   
c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   ImproperConnectionState  s   
c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   CannotSendRequest  s   
c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   CannotSendHeader  s   
c             B   s   |  Ee  Z d  S(   N(   u   __name__u
   __module__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   ResponseNotReady  s   
c             B   s   |  Ee  Z d    Z d S(   c             C   s   | f |  _  | |  _ d  S(   N(   u   argsu   line(   u   selfu   line(    (    u(   /mit/python/lib/python3.0/http/client.pyu   __init__  s    N(   u   __name__u
   __module__u   __init__(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   BadStatusLine  s   
c             B   sP   |  Ee  Z d  Z d   Z d   Z d   Z d d  Z d   Z d d  Z	 d S(   u2   A limited file-like object for HTTP/0.9 responses.c             C   s7   | |  _  | |  _ d |  _ d |  _ t |  |  _ d  S(   Ni    (   u   _lineu   _fileu   _line_consumedu   _line_offsetu   lenu
   _line_left(   u   selfu   lineu   file(    (    u(   /mit/python/lib/python3.0/http/client.pyu   __init__  s
    				c             C   s   t  |  j |  S(   N(   u   getattru   _file(   u   selfu   attr(    (    u(   /mit/python/lib/python3.0/http/client.pyu   __getattr__  s    c             C   s:   d |  _  |  j j |  _ |  j j |  _ |  j j |  _ d  S(   Ni   (   u   _line_consumedu   _fileu   readu   readlineu	   readlines(   u   self(    (    u(   /mit/python/lib/python3.0/http/client.pyu   _done  s    	c             C   s   |  j  o |  j j |  S| d  k p | |  j k oa |  j |  j d   } |  j   | d  k o | |  j j   S| |  j j | t |   Sna |  j } | | } |  j | |  } | |  _ |  j | 8_ |  j d k o |  j   n | Sd  S(   Ni    (	   u   _line_consumedu   _fileu   readu   Noneu
   _line_leftu   _lineu   _line_offsetu   _doneu   len(   u   selfu   amtu   su   iu   j(    (    u(   /mit/python/lib/python3.0/http/client.pyu   read  s     

"	
	c             C   s<   |  j  o |  j j   S|  j |  j d   } |  j   | S(   N(   u   _line_consumedu   _fileu   readlineu   _lineu   _line_offsetu   _done(   u   selfu   s(    (    u(   /mit/python/lib/python3.0/http/client.pyu   readline$  s
    

c             C   su   |  j  o |  j j |  S|  j |  j d   g } |  j   | d  k o | |  j j   S| |  j j |  Sd  S(   N(   u   _line_consumedu   _fileu	   readlinesu   _lineu   _line_offsetu   _doneu   None(   u   selfu   sizeu   L(    (    u(   /mit/python/lib/python3.0/http/client.pyu	   readlines,  s    

N(
   u   __name__u
   __module__u   __doc__u   __init__u   __getattr__u   _doneu   Noneu   readu   readlineu	   readlines(   u
   __locals__(    (    u(   /mit/python/lib/python3.0/http/client.pyu   LineAndFileWrapper  s   
					u   LineAndFileWrapper(]   u   __doc__u   iou   socketu   email.parseru   emailu   email.messageu   urllib.parseu   urlsplitu   warningsu   __all__u	   HTTP_PORTu
   HTTPS_PORTu   _UNKNOWNu   _CS_IDLEu   _CS_REQ_STARTEDu   _CS_REQ_SENTu   CONTINUEu   SWITCHING_PROTOCOLSu
   PROCESSINGu   OKu   CREATEDu   ACCEPTEDu   NON_AUTHORITATIVE_INFORMATIONu
   NO_CONTENTu   RESET_CONTENTu   PARTIAL_CONTENTu   MULTI_STATUSu   IM_USEDu   MULTIPLE_CHOICESu   MOVED_PERMANENTLYu   FOUNDu	   SEE_OTHERu   NOT_MODIFIEDu	   USE_PROXYu   TEMPORARY_REDIRECTu   BAD_REQUESTu   UNAUTHORIZEDu   PAYMENT_REQUIREDu	   FORBIDDENu	   NOT_FOUNDu   METHOD_NOT_ALLOWEDu   NOT_ACCEPTABLEu   PROXY_AUTHENTICATION_REQUIREDu   REQUEST_TIMEOUTu   CONFLICTu   GONEu   LENGTH_REQUIREDu   PRECONDITION_FAILEDu   REQUEST_ENTITY_TOO_LARGEu   REQUEST_URI_TOO_LONGu   UNSUPPORTED_MEDIA_TYPEu   REQUESTED_RANGE_NOT_SATISFIABLEu   EXPECTATION_FAILEDu   UNPROCESSABLE_ENTITYu   LOCKEDu   FAILED_DEPENDENCYu   UPGRADE_REQUIREDu   INTERNAL_SERVER_ERRORu   NOT_IMPLEMENTEDu   BAD_GATEWAYu   SERVICE_UNAVAILABLEu   GATEWAY_TIMEOUTu   HTTP_VERSION_NOT_SUPPORTEDu   INSUFFICIENT_STORAGEu   NOT_EXTENDEDu	   responsesu	   MAXAMOUNTu   messageu   Messageu   HTTPMessageu   parse_headersu   HTTPResponseu   HTTPConnectionu   sslu   ImportErroru   HTTPSConnectionu
   FakeSocketu   appendu	   Exceptionu   HTTPExceptionu   NotConnectedu
   InvalidURLu   UnknownProtocolu   UnknownTransferEncodingu   UnimplementedFileModeu   IncompleteReadu   ImproperConnectionStateu   CannotSendRequestu   CannotSendHeaderu   ResponseNotReadyu   BadStatusLineu   erroru   LineAndFileWrapper(    (    (    u(   /mit/python/lib/python3.0/http/client.pyu   <module>C   s  			
	 ] N	