/snap/core22/2411/usr/lib/python3.10/__pycache__
NameSizeModeActions
abc.cpython-310.pyc67510644editdlrm
aifc.cpython-310.pyc246850644editdlrm
antigravity.cpython-310.pyc8220644editdlrm
argparse.cpython-310.pyc635390644editdlrm
ast.cpython-310.pyc557390644editdlrm
asynchat.cpython-310.pyc70250644editdlrm
asyncore.cpython-310.pyc160020644editdlrm
base64.cpython-310.pyc171620644editdlrm
bdb.cpython-310.pyc258320644editdlrm
binhex.cpython-310.pyc128700644editdlrm
bisect.cpython-310.pyc25880644editdlrm
bz2.cpython-310.pyc108700644editdlrm
calendar.cpython-310.pyc263030644editdlrm
cgi.cpython-310.pyc267230644editdlrm
cgitb.cpython-310.pyc99980644editdlrm
chunk.cpython-310.pyc48600644editdlrm
cmd.cpython-310.pyc127070644editdlrm
code.cpython-310.pyc99570644editdlrm
codecs.cpython-310.pyc332190644editdlrm
codeop.cpython-310.pyc55950644editdlrm
colorsys.cpython-310.pyc32650644editdlrm
compileall.cpython-310.pyc127330644editdlrm
configparser.cpython-310.pyc454580644editdlrm
contextlib.cpython-310.pyc208950644editdlrm
contextvars.cpython-310.pyc2460644editdlrm
copy.cpython-310.pyc69960644editdlrm
copyreg.cpython-310.pyc46830644editdlrm
cProfile.cpython-310.pyc51130644editdlrm
crypt.cpython-310.pyc35500644editdlrm
csv.cpython-310.pyc117980644editdlrm
dataclasses.cpython-310.pyc265780644editdlrm
datetime.cpython-310.pyc565330644editdlrm
decimal.cpython-310.pyc3620644editdlrm
difflib.cpython-310.pyc589050644editdlrm
dis.cpython-310.pyc156560644editdlrm
doctest.cpython-310.pyc761750644editdlrm
enum.cpython-310.pyc260630644editdlrm
filecmp.cpython-310.pyc87490644editdlrm
fileinput.cpython-310.pyc140720644editdlrm
fnmatch.cpython-310.pyc42440644editdlrm
fractions.cpython-310.pyc186000644editdlrm
ftplib.cpython-310.pyc289770644editdlrm
functools.cpython-310.pyc283350644editdlrm
genericpath.cpython-310.pyc39070644editdlrm
getopt.cpython-310.pyc63390644editdlrm
getpass.cpython-310.pyc42100644editdlrm
gettext.cpython-310.pyc182210644editdlrm
glob.cpython-310.pyc58520644editdlrm
graphlib.cpython-310.pyc76160644editdlrm
gzip.cpython-310.pyc185460644editdlrm
hashlib.cpython-310.pyc68450644editdlrm
heapq.cpython-310.pyc138650644editdlrm
hmac.cpython-310.pyc69730644editdlrm
imaplib.cpython-310.pyc424320644editdlrm
imghdr.cpython-310.pyc39050644editdlrm
imp.cpython-310.pyc97860644editdlrm
inspect.cpython-310.pyc851530644editdlrm
io.cpython-310.pyc36630644editdlrm
ipaddress.cpython-310.pyc626700644editdlrm
keyword.cpython-310.pyc9270644editdlrm
linecache.cpython-310.pyc41420644editdlrm
locale.cpython-310.pyc461540644editdlrm
lzma.cpython-310.pyc121000644editdlrm
mailbox.cpython-310.pyc600910644editdlrm
mailcap.cpython-310.pyc73200644editdlrm
mimetypes.cpython-310.pyc176190644editdlrm
modulefinder.cpython-310.pyc161660644editdlrm
netrc.cpython-310.pyc39330644editdlrm
nntplib.cpython-310.pyc316230644editdlrm
ntpath.cpython-310.pyc147040644editdlrm
nturl2path.cpython-310.pyc17470644editdlrm
numbers.cpython-310.pyc118660644editdlrm
opcode.cpython-310.pyc54470644editdlrm
operator.cpython-310.pyc135080644editdlrm
optparse.cpython-310.pyc477540644editdlrm
os.cpython-310.pyc315990644editdlrm
pathlib.cpython-310.pyc420520644editdlrm
pdb.cpython-310.pyc474400644editdlrm
pickle.cpython-310.pyc468820644editdlrm
pickletools.cpython-310.pyc677600644editdlrm
pipes.cpython-310.pyc77690644editdlrm
pkgutil.cpython-310.pyc183610644editdlrm
platform.cpython-310.pyc274290644editdlrm
plistlib.cpython-310.pyc237650644editdlrm
poplib.cpython-310.pyc136700644editdlrm
posixpath.cpython-310.pyc105600644editdlrm
pprint.cpython-310.pyc178750644editdlrm
profile.cpython-310.pyc143910644editdlrm
pstats.cpython-310.pyc236210644editdlrm
pty.cpython-310.pyc41430644editdlrm
pyclbr.cpython-310.pyc97750644editdlrm
pydoc.cpython-310.pyc856450644editdlrm
py_compile.cpython-310.pyc73390644editdlrm
queue.cpython-310.pyc107920644editdlrm
quopri.cpython-310.pyc57940644editdlrm
random.cpython-310.pyc227480644editdlrm
re.cpython-310.pyc142270644editdlrm
reprlib.cpython-310.pyc52500644editdlrm
rlcompleter.cpython-310.pyc59540644editdlrm
runpy.cpython-310.pyc94110644editdlrm
sched.cpython-310.pyc61150644editdlrm
secrets.cpython-310.pyc21750644editdlrm
selectors.cpython-310.pyc171050644editdlrm
shelve.cpython-310.pyc94920644editdlrm
shlex.cpython-310.pyc77820644editdlrm
shutil.cpython-310.pyc385360644editdlrm
signal.cpython-310.pyc29350644editdlrm
site.cpython-310.pyc179220644editdlrm
sitecustomize.cpython-310.pyc2250644editdlrm
smtpd.cpython-310.pyc261470644editdlrm
smtplib.cpython-310.pyc357660644editdlrm
sndhdr.cpython-310.pyc69620644editdlrm
socket.cpython-310.pyc289630644editdlrm
socketserver.cpython-310.pyc253470644editdlrm
sre_compile.cpython-310.pyc151940644editdlrm
sre_constants.cpython-310.pyc63570644editdlrm
sre_parse.cpython-310.pyc217550644editdlrm
ssl.cpython-310.pyc452710644editdlrm
stat.cpython-310.pyc42730644editdlrm
statistics.cpython-310.pyc370510644editdlrm
string.cpython-310.pyc71020644editdlrm
stringprep.cpython-310.pyc170750644editdlrm
struct.cpython-310.pyc3070644editdlrm
subprocess.cpython-310.pyc447410644editdlrm
sunau.cpython-310.pyc164820644editdlrm
symtable.cpython-310.pyc128350644editdlrm
sysconfig.cpython-310.pyc181510644editdlrm
tabnanny.cpython-310.pyc69500644editdlrm
tarfile.cpython-310.pyc706740644editdlrm
telnetlib.cpython-310.pyc185060644editdlrm
tempfile.cpython-310.pyc273390644editdlrm
textwrap.cpython-310.pyc138120644editdlrm
this.cpython-310.pyc12640644editdlrm
threading.cpython-310.pyc449690644editdlrm
timeit.cpython-310.pyc117690644editdlrm
token.cpython-310.pyc27380644editdlrm
tokenize.cpython-310.pyc171940644editdlrm
trace.cpython-310.pyc198700644editdlrm
traceback.cpython-310.pyc217120644editdlrm
tracemalloc.cpython-310.pyc175250644editdlrm
tty.cpython-310.pyc10790644editdlrm
turtle.cpython-310.pyc1288570644editdlrm
types.cpython-310.pyc95250644editdlrm
typing.cpython-310.pyc852770644editdlrm
uu.cpython-310.pyc38670644editdlrm
uuid.cpython-310.pyc224980644editdlrm
warnings.cpython-310.pyc136460644editdlrm
wave.cpython-310.pyc175940644editdlrm
weakref.cpython-310.pyc203430644editdlrm
webbrowser.cpython-310.pyc170000644editdlrm
xdrlib.cpython-310.pyc78800644editdlrm
zipapp.cpython-310.pyc60130644editdlrm
zipfile.cpython-310.pyc618450644editdlrm
zipimport.cpython-310.pyc170330644editdlrm
_aix_support.cpython-310.pyc28790644editdlrm
_bootsubprocess.cpython-310.pyc22940644editdlrm
_collections_abc.cpython-310.pyc329250644editdlrm
_compat_pickle.cpython-310.pyc58720644editdlrm
_compression.cpython-310.pyc45120644editdlrm
_distutils_system_mod.cpython-310.pyc54220644editdlrm
_markupbase.cpython-310.pyc75720644editdlrm
_osx_support.cpython-310.pyc115350644editdlrm
_pydecimal.cpython-310.pyc1577360644editdlrm
_pyio.cpython-310.pyc736540644editdlrm
_py_abc.cpython-310.pyc46830644editdlrm
_sitebuiltins.cpython-310.pyc35470644editdlrm
_strptime.cpython-310.pyc159450644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc353850644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-310.pyc353790644editdlrm
_threading_local.cpython-310.pyc65390644editdlrm
_weakrefset.cpython-310.pyc76080644editdlrm
__future__.cpython-310.pyc41310644editdlrm
__phello__.foo.cpython-310.pyc1300644editdlrm
Edit: /snap/core22/2411/usr/lib/python3.10/__pycache__/cgi.cpython-310.pyc (26723B)
o `wi3@s`dZdZddlmZmZmZddlmZddlZddl Z ddl Z ddl m Z ddlmZddlZddlZddlZddlZgdZd adad d Zd d ZddZddZeadade jdddfddZd2ddZddZ ddZ!GdddZ"Gdd d Z#e jfd!d"Z$d3d#d$Z%e jfd%d&Z&d'd(Z'd)d*Z(d+d,Z)d-d.Z*d/d0Z+e,d1kre$dSdS)4zSupport module for CGI (Common Gateway Interface) scripts. This module defines a number of utilities for use by CGI scripts written in Python. z2.6)StringIOBytesIO TextIOWrapper)MappingN) FeedParser)Message) MiniFieldStorage FieldStorageparseparse_multipart parse_headertestprint_exception print_environ print_formprint_directoryprint_argumentsprint_environ_usagecGsXtjdtddtrtsz ttdddaWn tyYnwts$tant at|dS)aWrite a log message, if there is a log file. Even though this function is called initlog(), you should always use log(); log is a variable that is set either to initlog (initially), to dolog (once the log file has been opened), or to nolog (when logging is disabled). The first argument is a format string; the remaining arguments (if any) are arguments to the % operator, so e.g. log("%s: %s", "a", "b") will write "a: b" to the log file, followed by a newline. If the global logfp is not None, it should be a file object to which log data is written. If the global logfp is None, the global logfile may be a string giving a filename to open, in append mode. This file should be world writable!!! If the file can't be opened, logging is silently disabled (since there is no safe place where we could send an error message). z7cgi.log() is deprecated as of 3.10. Use logging instead) stacklevelalocale)encodingN) warningswarnDeprecationWarninglogfilelogfpopenOSErrornologlogdologallargsr&/usr/lib/python3.10/cgi.pyinitlog9s  r(cGst||ddS)z=Write a log message to the log file. See initlog() for docs. N)rwrite)fmtargsr&r&r'r#^sr#cGsdS)z9Dummy function, assigned to log when logging is disabled.Nr&r$r&r&r'r!bsr!cCsdatr tdatadS)zClose the log file.rN)rrcloser(r"r&r&r&r'closelogfs r.&c CsV|durtj}t|dr|j}nd}t|tr|j}d|vr"d|d<|ddkrt|d\}}|dkr;t|||d S|d krXt |d }t rO|t krOt d | | |} nd } d|vrk| rd| d} | |d} ntjddr| rx| d} | tjd} | |d<nd|vr|d} ntjddrtjd} nd } | |d<tjj| ||||dS)aParse a query in the environment or from a file (default stdin) Arguments, all optional: fp : file pointer; default: sys.stdin.buffer environ : environment dictionary; default: os.environ keep_blank_values: flag indicating whether blank values in percent-encoded forms should be treated as blank strings. A true value indicates that blanks should be retained as blank strings. The default false value indicates that blank values are to be ignored and treated as if they were not included. strict_parsing: flag indicating what to do with parsing errors. If false (the default), errors are silently ignored. If true, errors raise a ValueError exception. separator: str. The symbol to use for separating the query arguments. Defaults to &. Nrzlatin-1REQUEST_METHODGETPOST CONTENT_TYPEzmultipart/form-data) separator!application/x-www-form-urlencodedCONTENT_LENGTHMaximum content length exceededr QUERY_STRINGr/)rr4)sysstdinhasattrr isinstancerbufferr r intmaxlen ValueErrorreaddecodeargvurllibr parse_qs) fpenvironkeep_blank_valuesstrict_parsingr4rctypepdictclengthqsr&r&r'r ysF           r utf-8replacecsv|dd}d|}t}||z|d|d<Wn ty%Ynwt||||ddi|dfd d DS) aParse multipart input. Arguments: fp : input file pdict: dictionary containing other parameters of content-type header encoding, errors: request encoding and error handler, passed to FieldStorage Returns a dictionary just like parse_qs(): keys are the field names, each value is a list of values for that field. For non-file fields, the value is a list of strings. boundaryasciiz multipart/form-data; boundary={}zCONTENT-LENGTHzContent-Lengthr0r2)headersrerrorsrHr4csi|]}||qSr&)getlist).0kfsr&r' sz#parse_multipart..)rCformatrset_typeKeyErrorr )rGrLrrTr4rQrKrSr&rXr'r s    r ccs|dddkrg|dd}|d}|dkrD|dd||dd|drD|d|d}|dkrD|dd||dd|ds(|dkrLt|}|d|}|V||d}|dddks dSdS)Nr9;r"\"r)findcountlenstrip)sendfr&r&r' _parseparams  ((   rhcCstd|}|}i}|D]I}|d}|dkrW|d|}||dd}t|dkrS|d|dkrAdkrSnn|dd}|d d d d}|||<q||fS) zfParse a Content-type like header. Return the main content-type and a dictionary of options. r^=rNr9rr_z\\\r`)rh__next__rardlowerrcrP)linepartskeyrLpinamevaluer&r&r'r s  , r c@s@eZdZdZdZdZdZdZiZdZ iZ iZ ddZ ddZ dS)rz=Like FieldStorage, for use when no file uploads are possible.NcCs||_||_dS)z&Constructor from field name and value.Nrsrtselfrsrtr&r&r'__init__ s zMiniFieldStorage.__init__cCsd|j|jfS)z Return printable representation.zMiniFieldStorage(%r, %r)rurwr&r&r'__repr__szMiniFieldStorage.__repr__)__name__ __module__ __qualname____doc__filenamelisttypefile type_options dispositiondisposition_optionsrSrxrzr&r&r&r'rs rc @seZdZdZdddejdddddddf dd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ d;ddZd;ddZddZddZd d!Zd"d#Zd$d%Zd&d'ZdZd(d)Zd*d+Zd,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Z dS)rGrr<rrTbytesrr{ outerboundary bytes_readlimitr rrrsr _binary_filer innerboundaryr?rAr@lengthrrdoneread_urlencoded read_multi read_single)rwrGrSrrHrIrJrrrTrr4methodrNcdisprLrKclenr&r&r'rxBs/                         zFieldStorage.__init__cCs&z|jWdStyYdSwN)rr-AttributeErrorryr&r&r'__del__s  zFieldStorage.__del__cCs|Srr&ryr&r&r' __enter__szFieldStorage.__enter__cGs|jdSr)rr-)rwr,r&r&r'__exit__szFieldStorage.__exit__cCsd|j|j|jfS)z"Return a printable representation.zFieldStorage(%r, %r, %r))rsrrtryr&r&r'rzs zFieldStorage.__repr__cC t|Sr)iterkeysryr&r&r'__iter__ zFieldStorage.__iter__cCsX|dkrt||jr|jd|j}|jd|S|jdur(|j}|Sd}|S)Nrtr)rrseekrBrrvr&r&r' __getattr__s    zFieldStorage.__getattr__cCsZ|jdur tdg}|jD] }|j|kr||q|s!t|t|dkr+|dS|S)zDictionary style indexing.N not indexabler9r)rrrsappendr]rc)rwrpfounditemr&r&r' __getitem__s   zFieldStorage.__getitem__cCs2||vr||}t|trdd|DS|jS|S)z8Dictionary style get() method, including 'value' lookup.cSg|]}|jqSr&rtrVxr&r&r' z)FieldStorage.getvalue..r=rrtrwrpdefaultrtr&r&r'getvalues  zFieldStorage.getvaluecCs.||vr||}t|tr|djS|jS|S)z! Return the first value received.rrrr&r&r'getfirst!s   zFieldStorage.getfirstcCs4||vr||}t|trdd|DS|jgSgS)z Return list of received values.cSrr&rrr&r&r'r1rz(FieldStorage.getlist..r)rwrprtr&r&r'rU,s  zFieldStorage.getlistcCs*|jdur tdttdd|jDS)zDictionary style keys() method.Nrcss|]}|jVqdSrrsrVrr&r&r' ;sz$FieldStorage.keys..)rrsetryr&r&r'r7 zFieldStorage.keyscs*|jdur tdtfdd|jDS)z%Dictionary style __contains__ method.Nrc3s|]}|jkVqdSrrrrpr&r'rAsz,FieldStorage.__contains__..)rrany)rwrpr&rr' __contains__=rzFieldStorage.__contains__cCr)z Dictionary style len(x) support.)rcrryr&r&r'__len__C zFieldStorage.__len__cCs|jdur tdt|jS)NzCannot be converted to bool.)rrboolryr&r&r'__bool__Gs  zFieldStorage.__bool__c Cs|j|j}t|tstd|jt|jf||j |j }|j r*|d|j 7}t j j||j|j|j |j |j|jd}dd|D|_|dS)z+Internal: read data in query string format.%s should return bytes, got %sr/rrTrr4cSsg|] \}}t||qSr&rrVrprtr&r&r'rYsz0FieldStorage.read_urlencoded..N)rGrBrr=rrArr{rCrrTrrEr parse_qslrIrJrr4r skip_lines)rwrNqueryr&r&r'rLs   zFieldStorage.read_urlencodedc CsJ|j}t|std|fg|_|jr3tjj|j|j|j |j |j |j |j d}|jdd|D|jp8|j}|j}t|tsOtd|jt|jf|jt|7_|d|jkr||r||j}|jt|7_|d|jkr||sc|j }|dur|t|j8} t} d } |j} | | 7} | snq| sn||jt| 7_| | |j |j | } d | vr| d =|jdurdn|j|j} ||j| ||||| |j |j ||j }|dur|d 8}|jr|t|j8}|d krtd |j|j7_|j||j s|j|j!krd krnnnq|"dS)z/Internal: read a part that is itself multipart.z&Invalid boundary in multipart form: %rrcss|] \}}t||VqdSrrrr&r&r'risz*FieldStorage.read_multi..r--NTrrr9rzMax number of fields exceeded)#rvalid_boundaryrArrrEr rrIrJrrTrr4extendFieldStorageClass __class__rGrr=rrr{rrcrdrfeedrCr-rrrrr)rwrHrIrJibrklass first_linerparserhdr_textdatarSrpartr&r&r'r^s        ( $zFieldStorage.read_multicCs4|jdkr||n||jddS)zInternal: read an atomic part.rN)r read_binaryr read_linesrrryr&r&r'rs  zFieldStorage.read_singlei cCs||_|j}|dkrM|dkrO|jt||j}t|ts+t d|jt |j f|j t |7_ |s;d|_dS|j||t |}|dksdSdSdS)zInternal: read binary data.rrrjN) make_filerrrGrBminbufsizer=rrArr{rrcrr*)rwtodorr&r&r'rs$     zFieldStorage.read_binarycCsB|jr t|_|_nt|_|_|jr|dS|dS)z0Internal: read lines until EOF or outerboundary.N)rrr_FieldStorage__filerrread_lines_to_outerboundaryread_lines_to_eofryr&r&r'rs   zFieldStorage.read_linescCsx|jdur#|jt|dkr#||_|j}|j|d|_|jr.|j|dS|j||j |j dS)z line is always bytes, not stringNi) rtellrcrrrr*rrCrrT)rwrnrr&r&r'__writes    zFieldStorage.__writecCs: |jd}|jt|7_|sd|_dS||q)zInternal: read lines until EOF.r9rjN)rGrrrcr_FieldStorage__write)rwrnr&r&r'rs  zFieldStorage.read_lines_to_eofc Cs@d|j}|d}d}d}d} |jdur"d|jkr!|kr"dS|jd}|jt|7_|t|7}|s>d|_dS|d krH||}d}|drb|rb|}||krYdS||krbd|_dS|}| d rtd }|dd }d}n$| d rd }|dd}d}n| d rd }|dd}d }nd}d }| ||q)zInternal: read lines until outerboundary. Data is read as bytes: boundaries and line ends must be converted to bytes for comparisons. rrTrr9Nrrj s  F) rrrGrrrcr startswithrstripendswithr) rw next_boundary last_boundarydelimlast_line_lfend_readrn strippedlineodelimr&r&r'rsT         z(FieldStorage.read_lines_to_outerboundarycCs|jr|jrdSd|j}|d}d} |jd}|jt|7_|s*d|_dS|drD|rD|}||kr;dS||krDd|_dS|d}q)z5Internal: skip lines until outer boundary if defined.NrTrrjr9r)rrrGrrrcrrd)rwrrrrnrr&r&r'rs(    zFieldStorage.skip_linescCs"|jrtdStjd|jddS)aOverridable: return a readable & writable file. The file will be used as follows: - data is written to it - seek(0) - data is read from it The file is opened in binary mode for files, in text mode for other fields This version opens a temporary file for reading and writing, and immediately deletes (unlinks) it. The trick (on Unix!) is that the file can still be used, but it can't be opened by another process, and it will automatically be deleted when it is closed or when the current process terminates. If you want a more permanent file, you derive a class which overrides this method. If you want a visible temporary file that is nevertheless automatically deleted when the script terminates, try defining a __del__ method in a derived class which unlinks the temporary files you have created. zwb+zw+r))rnewline)rtempfile TemporaryFilerryr&r&r'r+s  zFieldStorage.make_filer)!r{r|r}r~osrHrxrrrrzrrrrrrUrrrrrrrrrrrrrrrrr&r&r&r'r sD) &    E   2 r cCstdttjt_z't}ttt|t|t dd}|fdd}td|Wnt Ytdda zt}ttt|t|Wd St Yd S) zRobust test CGI script, usable as main program. Write minimal HTTP headers and dump all information provided to the script in HTML form. zContent-type: text/htmlcSs tddS)Nz,testing print_exception() -- italics?)execr&r&r&r'rg^rztest..fcSs |dSrr&)rgr&r&r'g`s ztest..gz9

What follows is a test, not an actual exception:

z*

Second try with a small maxlen...

2N) printr:stdoutstderrr rrrrrrr@)rHformrgrr&r&r'r Ms4   r c Csx|dur t\}}}ddl}ttd||||||}tdtd|ddt|df~dS)Nrz+

Traceback (most recent call last):

z
%s%s
rrj) r:exc_info tracebackr format_tbformat_exception_onlyhtmlescapejoin)rrttbrrrr&r&r'rts   rc Cs\t|}ttdtd|D]}tdt|dt||qtdtdS)z#Dump the shell environment as HTML.z

Shell Environment:





N)sortedrrrr)rHrrpr&r&r'rs   rcCst|}ttd|stdtd|D]-}tdt|ddd||}tdttt|d td tt|qtd td S) z$Dump the contents of a form as HTML.z

Form Contents:

z

No form fields.r r : )rfzzr r N)r rrrrreprr)rrrprtr&r&r'rs  rc Cslttdzt}Wnty)}ztdtt|WYd}~n d}~wwtt|tdS)z#Dump the current directory as HTML.z#

Current Working Directory:

zOSError:N)rrgetcwdr rrstr)pwdmsgr&r&r'rs   rcCs(ttdtttjtdS)Nz

Command Line Arguments:

)rr:rDr&r&r&r'rs   rcCs tddS)z9Dump a list of environment variables used by CGI as HTML.a

These environment variables could have been set:

  • AUTH_TYPE
  • CONTENT_LENGTH
  • CONTENT_TYPE
  • DATE_GMT
  • DATE_LOCAL
  • DOCUMENT_NAME
  • DOCUMENT_ROOT
  • DOCUMENT_URI
  • GATEWAY_INTERFACE
  • LAST_MODIFIED
  • PATH
  • PATH_INFO
  • PATH_TRANSLATED
  • QUERY_STRING
  • REMOTE_ADDR
  • REMOTE_HOST
  • REMOTE_IDENT
  • REMOTE_USER
  • REQUEST_METHOD
  • SCRIPT_NAME
  • SERVER_NAME
  • SERVER_PORT
  • SERVER_PROTOCOL
  • SERVER_ROOT
  • SERVER_SOFTWARE
In addition, HTTP headers sent by the server may be passed in the environment as well. Here are some common variable names:
  • HTTP_ACCEPT
  • HTTP_CONNECTION
  • HTTP_HOST
  • HTTP_PRAGMA
  • HTTP_REFERER
  • HTTP_USER_AGENT
N)rr&r&r&r'rrrcCs(ddl}t|tr d}nd}|||S)Nrs^[ -~]{0,200}[!-~]$z^[ -~]{0,200}[!-~]$)rer=rmatch)rer _vb_patternr&r&r'rs   r__main__)rOrPr/)NNNN)-r~ __version__iorrrcollections.abcrr:r urllib.parserE email.parserr email.messagerrrrr__all__rrr(r#r!r.r"r@rHr r rhr rr r rrrrrrrr{r&r&r&r'sZ    %  F : '  /