Your IP : 13.59.69.109


Current Path : /opt/alt/python27/lib/python2.7/site-packages/raven/utils/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/raven/utils/http.pyc

�
��Yc@@s�dZddlmZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZdejdedd�ZdS(s�
raven.utils.http
~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
i(tabsolute_importN(tdefaults(turllib2thttplib(tmatch_hostnamec
@s�dtjf��fd��Y�dtjf�fd��Y}|rS|g}n9ytjdtj��g}Wntk
r�g}nXtj|�}tj	dkr�t
j�}	t
j|�z|j
||�SWdt
j|	�Xn|j
|||�S(	NtValidHTTPSConnectionc@s,eZejZd�Z��fd�ZRS(c_@stjj|||�dS(N(RtHTTPConnectiont__init__(tselftargstkwargs((sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/http.pyRsc@s�tjd|j|jfd|j�}|jrF||_|j�ntj	|d�dtj
�|_�dk	r�t|jj
�|jp�|j�ndS(Ntaddressttimeouttca_certst	cert_reqs(tsockettcreate_connectionthosttportRt_tunnel_hosttsockt_tunneltssltwrap_sockett
CERT_REQUIREDtNoneRtgetpeercerttassert_hostname(RR(RR
(sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/http.pytconnects			
(t__name__t
__module__Rt
HTTPS_PORTtdefault_portRR((RR
(sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/http.pyRs		tValidHTTPSHandlerc@seZ�fd�ZRS(c@s|j�|�S(N(tdo_open(Rtreq(R(sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/http.pyt
https_open-s(RRR$((R(sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/http.pyR!,stcontextii(ii(RRRtHTTPSHandlerRt_create_unverified_contexttAttributeErrortbuild_openertsystversion_infoRtgetdefaulttimeouttsetdefaulttimeouttopen(
turltdataRR
t
verify_sslRR!thandlerstopenertdefault_timeout((RRR
sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/http.pyturlopens""	


(t__doc__t
__future__RRRR*t
raven.confRtraven.utils.compatRRtraven.utils.ssl_match_hostnameRRtTIMEOUTtFalseR5(((sA/opt/alt/python27/lib/python2.7/site-packages/raven/utils/http.pyt<module>s

?>