ó o”þfc@s»dZddlZddddddgZddd „ƒYZd „Zd „Zd d „Zd„Zd„Zid d6d d6d d6d d6d d6d d6d d6d d6j Z d„Z dS(s$Miscellaneous WSGI-related UtilitiesiÿÿÿÿNt FileWrappert guess_schemetapplication_urit request_uritshift_path_infotsetup_testing_defaultscBs5eZdZdd„Zd„Zd„Zd„ZRS(s1Wrapper to convert file-like objects to iterablesi cCs4||_||_t|dƒr0|j|_ndS(Ntclose(tfileliketblksizethasattrR(tselfRR((s$/usr/lib64/python2.7/wsgiref/util.pyt__init__s  cCs)|jj|jƒ}|r|St‚dS(N(RtreadRt IndexError(R tkeytdata((s$/usr/lib64/python2.7/wsgiref/util.pyt __getitem__scCs|S(N((R ((s$/usr/lib64/python2.7/wsgiref/util.pyt__iter__scCs)|jj|jƒ}|r|St‚dS(N(RR Rt StopIteration(R R((s$/usr/lib64/python2.7/wsgiref/util.pytnexts(t__name__t __module__t__doc__R RRR(((s$/usr/lib64/python2.7/wsgiref/util.pyR s    cCs!|jdƒdkrdSdSdS( sMReturn a guess for whether 'wsgi.url_scheme' should be 'http' or 'https' tHTTPStyestont1thttpsthttpN(syesRR(tget(tenviron((s$/usr/lib64/python2.7/wsgiref/util.pyR#scCsÌ|dd}ddlm}|jdƒr>||d7}nk||d7}|ddkr„|dd kr©|d |d7}q©n%|dd kr©|d |d7}n|||jd ƒpÁd ƒ7}|S(s@Return the application's base URI (no PATH_INFO or QUERY_STRING)swsgi.url_schemes://iÿÿÿÿ(tquotet HTTP_HOSTt SERVER_NAMERt SERVER_PORTt443t:t80t SCRIPT_NAMEt/(turllibRR(RturlR((s$/usr/lib64/python2.7/wsgiref/util.pyR+sicCs’t|ƒ}ddlm}||jddƒddƒ}|jdƒsZ||d7}n ||7}|rŽ|jd ƒrŽ|d |d 7}n|S( sBReturn the full request URI, optionally including the query stringiÿÿÿÿ(Rt PATH_INFOttsafes/;=,R&it QUERY_STRINGt?(RR(RR(Rt include_queryR)Rt path_info((s$/usr/lib64/python2.7/wsgiref/util.pyR?s  cCs|jddƒ}|sdS|jdƒ}g|dd!D]}|r9|dkr9|^q9|dd+|d}|d=|jddƒ}tj|d|ƒ}|jdƒrº|d }n| rÞ|jdƒ rÞ|d7}n||ds      ) (