Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
redhat_support_lib
/
web
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/redhat_support_lib/web/connection.pyo
mς TSc @ sΑ d k Z d k Z d k Z d k Z d k Z d k Z d k Z d k Z d k Z d k l Z l Z d k l Z d k l Z d k l Z d k l Z e i d Z d e f d YZ d S( N( s HTTPConnections BadStatusLine( s SSL( s HTTPSConnection( s RSLProxyHTTPSConnection( s RequestErrors! redhat_support_lib.web.connectiont Connectionc B sς t Z d Z e e e e e e e e e e d Z d Z d Z d Z e i h h d Z e e d Z e e d Z d Z d Z e e d Z d Z d Z d Z d Z d Z d Z e e e e e Z RS( s) The strata api connection proxy c C s) | | _ | | _ | | _ | | _ | | _ | | _ | | _ | | _ | | _ | | _ | | _ | | _ | | _ | i | } | d | _ | d | _ | d | _ d | _ | o- | i | } | d | _ | d | _ n | i | _ | i i t | | | _ t | | _ d S( Ni i i t ( t urlt selft usernamet passwordt key_filet cert_filet strictt timeoutt proxy_urlt proxy_usert proxy_passt debugt noverifyt ssl_cat _Connection__parse_urlt ut url_schemat url_hostt url_portt handlerprefixt purlt proxy_hostt proxy_portt _Connection__createConnectiont _Connection__connectiont set_debuglevelt intt managert _Connection__managert idt _Connection__id( R R R R R R R R R R R R R R R R R ( ( tE /usr/lib/python2.4/site-packages/redhat_support_lib/web/connection.pyt __init__( s4 c C s | i S( N( R R ( R ( ( R! t get_idW s c C s | i S( N( R R ( R ( ( R! t getConnectionZ s c C s | i i S( N( R t _Connection__headerst copy( R ( ( R! t getDefaultHeaders] s c C s€ d } x t o y: | i i | | i | | | i | | i i SWq t j oB | d j o+ | i | d 7} t i t d q q Xq Wd S( Ni i s' Connection socket closed, reconnecting.( t attemptst TrueR R t requestt methodR R t bodyt getHeaderst headerst getresponset BadStatusLinet resetConnectiont loggingR t _( R R+ R R, R. R( ( ( R! t doRequest` s c C s d } x t o| y' | i | | | | | i i SWq t j oB | d j o+ | i | d 7} t i t d q q Xq Wd S( s2 Wrapper for _doUpload to handle connection retriesi i s' Connection socket closed, reconnecting.N( R( R) R t _doUploadR t fileNamet fileChunkt descriptionR R/ R0 R1 R2 R R3 ( R R R6 R7 R8 R( ( ( R! t doUploadu s c C s¬ d t i } d } zyyht | d } t i i | } x@t o8g } | oB | i d | | i d | i d | i t | n | i d | | o; d t i i | | d f } | d i | | } n t i i | } | i d d | f | i d t i | d p d | i d | i d d i | } g } | i d | i d | d | i d d i | } t | t | } | o | | d 7} n | | 7} | i i d d d | d d d d | i h d t | <d d | <d d < } x- | i! D] \ } } | i i$ | | qCW| i i% | i i&