Current File : //lib/python2.7/site-packages/urllib3/fields.pyo |
�
v�Sc @ sW d d l Z d d l Z d d l m Z d d � Z d � Z d e f d � � YZ d S( i����Ni ( t sixs application/octet-streamc C s! | r t j | � d p | S| S( s�
Guess the "Content-Type" of a file.
:param filename:
The filename to guess the "Content-Type" of using :mod:`mimetypes`.
:param default:
If no "Content-Type" can be guessed, default to `default`.
i ( t mimetypest
guess_type( t filenamet default( ( s2 /usr/lib/python2.7/site-packages/urllib3/fields.pyt guess_content_type s c s� t � f d � d D� � sX d | � f } y | j d � Wn t k
rP qX X| Sn t j ss � j d � � n t j j � d � � d | � f � � S( s�
Helper function to format and quote a single header parameter.
Particularly useful for header parameters which might contain
non-ASCII values, like file names. This follows RFC 2231, as
suggested by RFC 2388 Section 4.4.
:param name:
The name of the parameter, a string expected to be ASCII only.
:param value:
The value of the parameter, provided as a unicode string.
c 3 s | ] } | � k Vq d S( N( ( t .0t ch( t value( s2 /usr/lib/python2.7/site-packages/urllib3/fields.pys <genexpr>"