File "validate.cpython-36.opt-2.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/lib64/python3.6/wsgiref/__pycache__/validate.cpython-36.opt-2.pyc
File size: 10.91 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

3


 \;;@sdgZddlZddlZddlZejdZejdZGdddeZddZ	d	d
Z
ddZGdd
d
ZGdddZ
GdddZGdddZGdddZddZddZddZddZddZd d!Zd"d#Zd$d%ZdS)&	validatorNz^[a-zA-Z][a-zA-Z0-9\-_]*$z[\000-\037]c@seZdZdS)WSGIWarningN)__name__
__module____qualname__rr(/usr/lib64/python3.6/wsgiref/validate.pyrysrcGs|st|dS)N)AssertionError)Zcondargsrrrassert_~srcCs(t|tkr|Stdj|t|dS)Nz!{0} must be of type str (got {1}))typestrr	formatrepr)valuetitlerrrcheck_string_typesrcsfdd}|S)Ncstt|dkdt|d|\}t|gfdd}t|d|d<t|d|d<||}t|dk	oz|dkd	t|t|S)
NzTwo arguments requiredzNo keyword arguments allowedcstt|dkpt|dkd|ft|d|d}|d}t|dkrV|d}nd}t|t|t||t|jdt|S)NrzInvalid number of arguments: %szNo keyword arguments allowedr)rlencheck_status
check_headerscheck_content_typecheck_exc_infoappendWriteWrapper)r
kwstatusheadersexc_info)start_responsestart_response_startedrrstart_response_wrappers


z;validator.<locals>.lint_app.<locals>.start_response_wrapperz
wsgi.inputzwsgi.errorsFz>The application must return an iterator, if only an empty list)rr
check_environInputWrapperErrorWrappercheck_iteratorIteratorWrapper)r
renvironr#iterator)application)r!r"rlint_apps
zvalidator.<locals>.lint_appr)r+r,r)r+rrs)c@s<eZdZddZddZddZddZd	d
ZddZd
S)r%cCs
||_dS)N)input)self
wsgi_inputrrr__init__szInputWrapper.__init__cGs0tt|dk|jj|}tt|tk|S)Nr)rrr-readrbytes)r.r
vrrrr1szInputWrapper.readcGs0tt|dk|jj|}tt|tk|S)Nr)rrr-readlinerr2)r.r
r3rrrr4szInputWrapper.readlinecGsNtt|dk|jj|}tt|tkx|D]}tt|tkq2W|S)Nr)rrr-	readlinesrlistr2)r.r
lineslinerrrr5s
zInputWrapper.readlinesccs x|j}|sdS|VqWdS)N)r4)r.r8rrr__iter__s
zInputWrapper.__iter__cCstdddS)Nrz input.close() must not be called)r)r.rrrcloseszInputWrapper.closeN)	rrrr0r1r4r5r9r:rrrrr%sr%c@s4eZdZddZddZddZddZd	d
ZdS)r&cCs
||_dS)N)errors)r.wsgi_errorsrrrr0szErrorWrapper.__init__cCs tt|tk|jj|dS)N)rrr
r;write)r.srrrr=szErrorWrapper.writecCs|jjdS)N)r;flush)r.rrrr?szErrorWrapper.flushcCsx|D]}|j|qWdS)N)r=)r.seqr8rrr
writeliness
zErrorWrapper.writelinescCstdddS)Nrz!errors.close() must not be called)r)r.rrrr:szErrorWrapper.closeN)rrrr0r=r?rAr:rrrrr&s
r&c@seZdZddZddZdS)rcCs
||_dS)N)writer)r.Zwsgi_writerrrrr0szWriteWrapper.__init__cCstt|tk|j|dS)N)rrr2rB)r.r>rrr__call__szWriteWrapper.__call__N)rrrr0rCrrrrrsrc@seZdZddZddZdS)PartialIteratorWrappercCs
||_dS)N)r*)r.
wsgi_iteratorrrrr0szPartialIteratorWrapper.__init__cCst|jdS)N)r(r*)r.rrrr9szPartialIteratorWrapper.__iter__N)rrrr0r9rrrrrDsrDc@s4eZdZddZddZddZddZd	d
ZdS)r(cCs ||_t||_d|_||_dS)NF)original_iteratoriterr*closedcheck_start_response)r.rErIrrrr0	s
zIteratorWrapper.__init__cCs|S)Nr)r.rrrr9szIteratorWrapper.__iter__cCsTt|jdt|j}t|tk	r4tdd|f|jdk	rPt|jdd|_|S)NzIterator read after closedFz$Iterator yielded non-bytestring (%r)zjThe application returns and we started iterating over its body, but start_response has not yet been called)rrHnextr*rr2rI)r.r3rrr__next__s

zIteratorWrapper.__next__cCs d|_t|jdr|jjdS)NTr:)rHhasattrrFr:)r.rrrr:szIteratorWrapper.closecCs"|jstjjdt|jddS)Nz/Iterator garbage collected without being closed)rHsysstderrr=r)r.rrr__del__#s
zIteratorWrapper.__del__N)rrrr0r9rKr:rOrrrrr(s
r(c	Cstt|tkdt||fx d,D]}t||kd|fq$Wx*d-D]"}t||kd||ddfqFWd|krtjdtxF|jD]:}d|krqtt||tkd|t||||fqWtt|dtkd|dft|dd.kd|dt	|dt
|d|dd/kr<tjd!|dtt|jd"pX|d"jd#d$|d"t|jd%p|d%jd#d&|d%|jd'rtt
|d'd(kd)|d'|jd"std%|kd*t|jd"d#kd+dS)0Nz:Environment is not of the right type: %r (environment: %r)REQUEST_METHODSERVER_NAMESERVER_PORTwsgi.version
wsgi.inputwsgi.errorswsgi.multithreadwsgi.multiprocess
wsgi.run_oncez$Environment missing required key: %rHTTP_CONTENT_TYPEHTTP_CONTENT_LENGTHz8Environment should not have the key: %s (use %s instead)ZQUERY_STRINGzQUERY_STRING is not in the WSGI environment; the cgi module will use sys.argv when this variable is missing, so application errors are more likely.z9Environmental variable %s is not a string: %r (value: %r)z#wsgi.version should be a tuple (%r)zwsgi.url_schemehttphttpszwsgi.url_scheme unknown: %rGETHEADPOSTOPTIONSPATCHPUTDELETETRACEzUnknown REQUEST_METHOD: %rZSCRIPT_NAME/z$SCRIPT_NAME doesn't start with /: %rZ	PATH_INFOz"PATH_INFO doesn't start with /: %rZCONTENT_LENGTHrzInvalid CONTENT_LENGTH: %rzgOne of SCRIPT_NAME or PATH_INFO are required (PATH_INFO should at least be '/' if SCRIPT_NAME is empty)zOSCRIPT_NAME cannot be '/'; it should instead be '', and PATH_INFO should be '/')	rPrQrRrSrTrUrVrWrX)rYrZ)r]r^)r_r`rarbrcrdrerf)rrdictwarningswarnrkeysr
tuplecheck_inputcheck_errorsget
startswithint)r)keyrrrr$*s`

r$cCs*x$dD]}tt||d||fqWdS)Nr1r4r5r9z-wsgi.input (%r) doesn't have the attribute %s)r1r4r5r9)rrL)r/attrrrrrmks

rmcCs*x$dD]}tt||d||fqWdS)Nr?r=rAz.wsgi.errors (%r) doesn't have the attribute %s)r?r=rA)rrL)r<rsrrrrnqs

rncCsvt|d}|jddd}tt|dkd|t|}t|dkd|t|dksb|dd	krrtjd
|tdS)NStatusrrrz)Status codes must be three characters: %rdzStatus code is invalid: %r zjThe status string (%r) should be a three-digit integer followed by a single space and a status explanation)rsplitrrrqrirjr)rZstatus_codeZ
status_intrrrrws

rcCstt|tkd|t|fi}x|D]}tt|tkd|t|ftt|dk|\}}t|d}t|d}t|jdkd|d||j<td|kod	|kd
|ttj|d|t|j	do|j	d
d|t
j|r(tdd|t
j|jdfq(WdS)Nz%Headers (%r) must be of type list: %rz1Individual headers (%r) must be of type tuple: %rrzHeader namezHeader valuerzyThe Status header cannot be used; it conflicts with CGI script, and HTTP status is not given through headers (value: %r).
:z,Header names may not contain ':' or '\n': %rzBad header name: %r-_z#Names may not end in '-' or '_': %rrz#Bad header value: %r (bad char: %r))rrr6rlrrlower	header_researchendswithbad_header_value_regroup)rZheader_namesitemnamerrrrrs0





rcCs~t|d}t|jddd}d
}x@|D]8\}}t|d}|jdkr(||krRdStdd|q(W||krztdd	|dS)Nrtrr0zHeader namezcontent-typezJContent-Type header found in a %s response, which must not return content.z,No Content-Type header found in headers (%s))rr)rrqrxr}r)rrcodeZNO_MESSAGE_BODYrrrrrrs

rcCs*t|dkpt|tkd|t|fdS)Nz exc_info (%r) is not a tuple: %r)rrrl)r rrrrsrcCstt|ttfddS)NzwYou should not return a string as your application iterator, instead return a single-item list containing a bytestring.)r
isinstancer
r2)r*rrrr'sr')__all__rerMricompiler~rWarningrrrrr%r&rrDr(r$rmrnrrrrr'rrrr<module>os,

7#		#A