3 \ @stddlZddddddgZGdddZd dZd dZdd dZd dZddZdddddddddjZ ddZ dS)N FileWrapper guess_schemeapplication_uri request_urishift_path_infosetup_testing_defaultsc@s.eZdZd ddZddZddZdd Zd S) r cCs"||_||_t|dr|j|_dS)Nclose)filelikeblksizehasattrr )selfr r r$/usr/lib64/python3.6/wsgiref/util.py__init__s zFileWrapper.__init__cCs|jj|j}|r|StdS)N)r readr IndexError)r keydatarrr __getitem__szFileWrapper.__getitem__cCs|S)Nr)r rrr__iter__szFileWrapper.__iter__cCs|jj|j}|r|StdS)N)r rr StopIteration)r rrrr__next__szFileWrapper.__next__N)r)__name__ __module__ __qualname__rrrrrrrrr s cCs|jddkrdSdSdS)NZHTTPSyeson1httpshttp)rrr)get)environrrrr#scCs|dd}ddlm}|jdr0||d7}nR||d7}|ddkrf|dd kr|d |d7}n|dd kr|d |d7}|||jd pd dd7}|S)Nzwsgi.url_schemez://r)quote HTTP_HOST SERVER_NAMEr SERVER_PORT443:80 SCRIPT_NAME/latin1)encoding) urllib.parser#r!)r"urlr#rrrr+s       TcCspt|}ddlm}||jddddd}|jdsF||d d7}n||7}|rl|jd rl|d |d 7}|S) Nr)r# PATH_INFOz/;=,r,)Zsafer-r*Z QUERY_STRING?)rr.r#r!)r"Z include_queryr/r# path_inforrrr?s  cCs|jdd}|sdS|jd}dd|dd D|dd <|d}|d=|jdd}tj|d|}|jdr~|dd }| r|jd r|d7}||d<dj||d<|dkrd}|S) Nr0r1r+cSsg|]}|r|dkr|qS).r).0prrr ^sz#shift_path_info..r2r*r5r9r9)r!split posixpathnormpathendswithjoin)r"r4 path_partsnameZ script_namerrrrLs$     cCs|jdd|jdd|jd|d|jddd|kr\d |kr\|jdd |jd d |jd d|jdd|jdd|jddddlm}m}|jd||jd||jdt||ddkr|jddn|ddkr|jdddS)Nr%z 127.0.0.1ZSERVER_PROTOCOLzHTTP/1.0r$ZREQUEST_METHODZGETr*r0r1r+z wsgi.versionr2rz wsgi.run_oncezwsgi.multithreadzwsgi.multiprocess)StringIOBytesIOz wsgi.inputz wsgi.errorszwsgi.url_schemer r&r)rr')r2r) setdefaultiorArBr)r"rArBrrrrus&           r2)Z connectionz keep-alivezproxy-authenticatezproxy-authorizationZteZtrailersztransfer-encodingZupgradecCs t|jS)N)_hoppishlower)Z header_namerrr is_hop_by_hopsrG)T) r;__all__rrrrrr __contains__rErGrrrrs ))