grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026§ yB|°évBíãó¨—dZdZddlmZmZmZddlmZddlZddl Z ddl Z ddl m Z ddlmZddlZddlZddlZddlZgd¢Zejed ¬ ¦«d adad „Zd „Zd„Zd„Zeadade jdddfd„Z d$d„Z!d„Z"d„Z#Gd„d¦«Z$Gd„d¦«Z%e jfd„Z&d%d„Z'e jfd„Z(d„Z)d„Z*d „Z+d!„Z,d"„Z-ed#kr e&¦«dSdS)&a¡Support module for CGI (Common Gateway Interface) scripts. This module defines a number of utilities for use by CGI scripts written in Python. The global variable maxlen can be set to an integer indicating the maximum size of a POST request. POST requests larger than this size will result in a ValueError being raised during parsing. The default value of this variable is 0, meaning the request size is unlimited. z2.6é)ÚStringIOÚBytesIOÚ TextIOWrapper)ÚMappingN)Ú FeedParser)ÚMessage) ÚMiniFieldStorageÚ FieldStorageÚparseÚparse_multipartÚ parse_headerÚtestÚprint_exceptionÚ print_environÚ print_formÚprint_directoryÚprint_argumentsÚprint_environ_usage)éé )ÚremoveÚcóê—tjdtd¬¦«tr0ts) t tdd¬¦«an#t $rYnwxYwtstantat|ŽdS)a„Write 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é)Ú stacklevelÚaÚlocale)ÚencodingN) ÚwarningsÚwarnÚDeprecationWarningÚlogfileÚlogfpÚopenÚOSErrorÚnologÚlogÚdolog©Úallargss ú*/opt/alt/python311/lib64/python3.11/cgi.pyÚinitlogr,As�€õ0 „MÐKÝ$°ð4ñ4ô4ð4åð•uðð Ý� #°Ð9Ñ9Ô9ˆEˆEøÝð ð ð Ø ˆDð øøøå ð݈ˆåˆÝˆ€M€M€M€Ms¬AÁ AÁAcóF—t ||zdz¦«dS)z=Write a log message to the log file. See initlog() for docs.ú N)r#Úwrite)ÚfmtÚargss r+r(r(fs"€å ‡K‚K��D‘˜4‘Ñ Ô Ð Ð Ð ócó—dS)z9Dummy function, assigned to log when logging is disabled.N©r)s r+r&r&js€à€Dr2có\—datrt ¦«datadS)zClose the log file.rN)r"r#Úcloser,r'r4r2r+Úcloselogr7ns,€ð€GÝ ðÝ � Š ‰ Œ ˆ ØˆÝ €C€C€Cr2ú&có:—|€ tj}t|d¦«r|j}nd}t |t ¦«r|j}d|vrd|d<|ddkrät|d¦«\}}|dkrt|||¬ ¦«S|d kr_t|d ¦«}tr|tkrtd ¦«‚|  |¦«  |¦«} nd } d|vr| r| dz} | |dz} n0tjdd…r| r| dz} | tjdz} | |d<n;d|vr |d} n.tjdd…rtjd} nd } | |d<tj | ||||¬¦«S)a‘Parse 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-1ÚREQUEST_METHODÚGETÚPOSTÚ CONTENT_TYPEzmultipart/form-data)Ú separatorú!application/x-www-form-urlencodedÚCONTENT_LENGTHúMaximum content length exceededrÚ QUERY_STRINGr8é)rr>)ÚsysÚstdinÚhasattrrÚ isinstancerÚbufferr r ÚintÚmaxlenÚ ValueErrorÚreadÚdecodeÚargvÚurllibr Úparse_qs) ÚfpÚenvironÚkeep_blank_valuesÚstrict_parsingr>rÚctypeÚpdictÚclengthÚqss r+r r �sì€ð0 €zÝ ŒYˆõˆr�*ÑÔðØ”;ˆˆàˆõ�"•mÑ$Ô$ðØ ŒYˆà ˜wÐ &Ð &Ø$)ˆÐ Ñ!ØÐÔ  FÒ*Ð*Ý# G¨NÔ$;Ñ<Ô<‰ ˆˆuØ Ð)Ò )Ð )Ý" 2 u¸ ÐBÑBÔBÐ BØ Ð9Ò 9Ð 9ݘ'Ð"2Ô3Ñ4Ô4ˆGÝð D˜'¥FÒ*Ð*Ý Ð!BÑCÔCÐCØ—’˜Ñ!Ô!×(Ò(¨Ñ2Ô2ˆBˆBàˆBØ ˜WÐ $Ð $ØÐ ˜˜S™�2Ø�g˜nÔ-Ñ-ˆBˆBÝ ŒX�a�b�bŒ\ð "ØÐ ˜˜S™�2Ø•c”h˜q”kÑ!ˆBØ"$ˆ�ÑÐØ ˜7Ð "Ð "Ø �^Ô $ˆˆå Œ8�A�B�BŒ<ð Ý”˜!”ˆBˆBàˆBØ"$ˆ�ÑÝ Œ<× Ò  Ð%6¸Ø*2¸ið !ñ Iô IðIr2úutf-8Úreplacecó.‡—|d d¦«}d |¦«}t¦«}| |¦« |d|d<n#t$rYnwxYwt ||||ddi|¬¦«Šˆfd „‰D¦«S) a™Parse 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. ÚboundaryÚasciiz multipart/form-data; boundary={}zCONTENT-LENGTHzContent-Lengthr:r<)ÚheadersrÚerrorsrRr>có<•—i|]}|‰ |¦«“ŒSr4)Úgetlist)Ú.0ÚkÚfss €r+ú z#parse_multipart..às%ø€Ð )Ð )Ð ) ˆAˆr�zŠz˜!‰}Œ}Ð )Ð )Ð )r2)rMÚformatrÚset_typeÚKeyErrorr ) rQrVrr_r>r\rUr^rds @r+r r ÇsÉø€ð�ZÔ ×'Ò'¨Ñ0Ô0€HØ .× 5Ò 5°hÑ ?Ô ?€E݉iŒi€GØ ×Ò�UÑÔÐð Ø$)Ð*:Ô$;ˆÐ Ñ!Ð!øÝ ð ð ð Ø ˆð øøøå �b '°HÀVØ! 6Ð*°ið Añ Aô A€Bà )Ð )Ð )Ð ) bÐ )Ñ )Ô )Ð)sÁ A"Á" A/Á.A/c#óK—|dd…dkr÷|dd…}| d¦«}|dkrƒ| dd|¦«| dd|¦«z dzrQ| d|dz¦«}|dkr2| dd|¦«| dd|¦«z dz°Q|dkrt|¦«}|d|…}| ¦«V—||d…}|dd…dk°õdSdS)NrCú;rú"ú\"r)ÚfindÚcountÚlenÚstrip)ÚsÚendÚfs r+Ú _parseparamrtâsèè€Ø ˆBˆQˆBŒ%�3Š,ˆ,Ø ˆaˆbˆbŒEˆØ�fŠf�S‰kŒkˆØ�AŠgˆg˜1Ÿ7š7 3¨¨3Ñ/Ô/°!·'²'¸%ÀÀCÑ2HÔ2HÑHÈAÑMˆgØ—&’&˜˜c A™gÑ&Ô&ˆCð�AŠgˆg˜1Ÿ7š7 3¨¨3Ñ/Ô/°!·'²'¸%ÀÀCÑ2HÔ2HÑHÈAÑMˆgà �Š7ˆ7Ý�a‘&”&ˆCØ ˆdˆsˆdŒGˆØ�gŠg‰iŒiˆˆˆØ ˆcˆdˆdŒGˆð ˆBˆQˆBŒ%�3Š,ˆ,ˆ,ˆ,ˆ,ˆ,r2có—td|z¦«}| ¦«}i}|D]Ò}| d¦«}|dkrµ|d|… ¦« ¦«}||dzd… ¦«}t |¦«dkrP|d|dcxkrdkr7nn4|dd…}| d d ¦« d d¦«}|||<ŒÓ||fS) zfParse a Content-type like header. Return the main content-type and a dictionary of options. rjú=rNrCréÿÿÿÿrkz\\ú\rl)rtÚ__next__rmrpÚlowerrorZ)ÚlineÚpartsÚkeyrVÚpÚiÚnameÚvalues r+r r îs€õ ˜˜d™ Ñ #Ô #€EØ �.Š.Ñ Ô €CØ €EØ ð ð ˆØ �FŠF�3‰KŒKˆØ �Š6ˆ6Ø�R�a�R”5—;’;‘=”=×&Ò&Ñ(Ô(ˆDØ�a˜‘c�d�d”G—M’M‘O”OˆEÝ�5‰zŒz˜QŠˆ 5¨¤8¨u°R¬yÐ#?Ð#?Ò#?Ð#?¸CÒ#?Ð#?Ð#?Ð#?Ð#?ؘa ˜dœ �ØŸ š  f¨dÑ3Ô3×;Ò;¸EÀ3ÑGÔG�؈E�$‰KøØ �ˆ:Ðr2có>—eZdZdZdZdZdZdZiZdZ iZ iZ d„Z d„Z dS)r z=Like FieldStorage, for use when no file uploads are possible.Ncó"—||_||_dS)z&Constructor from field name and value.N©r€r�©Úselfr€r�s r+Ú__init__zMiniFieldStorage.__init__s€àˆŒ ؈Œ ˆ ˆ r2có(—d|j›d|j›d�S)z Return printable representation.zMiniFieldStorage(ú, ú)r„©r†s r+Ú__repr__zMiniFieldStorage.__repr__s€€à-1¬Y¨Y¨Y¸¼ ¸ ¸ ÐCÐCr2)Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚfilenameÚlistÚtypeÚfileÚ type_optionsÚ dispositionÚdisposition_optionsr^r‡rŒr4r2r+r r sh€€€€€àGÐGð€HØ €DØ €DØ €DØ€LØ€KØÐØ€Gðððð DðDðDðDðDr2r c óÖ—eZdZdZdddejdddddddf d„Zd „Zd „Zd „Z d „Z d „Z d„Z d„Z d"d„Zd"d„Zd„Zd„Zd„Zd„Zd„Zd„ZdZd„Zd„ZdZd„Zd„Zd„Zd„Zd„Zd „Zd!„Z dS)#r aÉStore a sequence of fields, reading multipart/form-data. This class provides naming, typing, files stored on disk, and more. At the top level, it is accessible like a dictionary, whose keys are the field names. (Note: None can occur as a field name.) The items are either a Python list (if there's multiple values) or another FieldStorage or MiniFieldStorage object. If it's a single object, it has the following attributes: name: the field name, if specified; otherwise None filename: the filename, if specified; otherwise None; this is the client side filename, *not* the file name on which it is stored (that's a temporary file you don't deal with) value: the value as a *string*; for file uploads, this transparently reads the file every time you request the value and returns *bytes* file: the file(-like) object from which you can read the data *as bytes* ; None if the data is stored a simple string type: the content-type, or None if not specified type_options: dictionary of options specified on the content-type line disposition: content-disposition, or None if not specified disposition_options: dictionary of corresponding options headers: a dictionary(-like) object (sometimes email.message.Message or a subclass thereof) containing *all* headers The class is subclassable, mostly for the purpose of overriding the make_file() method, which is called internally to come up with a file open for reading and writing. This makes it possible to override the default choice of storing all files in a temporary directory and unlinking them as soon as they have been opened. Nr2rrYrZr8c ó²—d} ||_||_| |_| |_d|vr|d ¦«} d|_| dks| dkrrd|vr |d} n)t jdd…rt jd} nd} |  tj ¦«d¦«} t| ¦«}|€d d i}|€=i}| d krd |d <d |vr |d |d <d|vr |d|_d |vr |d |d<n+t|ttf¦«std¦«‚||_|€t jj|_nXt|t(¦«r |j|_n6t+|d¦«rt+|d¦«std¦«‚||_||_| |_t|t0¦«s$tdt3|¦«jz¦«‚||_d|_||_di}}d|jvrt=|jd¦«\}}||_||_ d|_!d|vr |d|_!d|_"d|vr |d|_"|j"du|_#d |jvrt=|jd ¦«\}}n|js| d krdi}}nd i}}||_||_$d|vr,|d |j|j¦«|_%nd|_%d}d|jvrM tM|jd¦«}n#tN$rYnwxYwtPr|tPkrtOd¦«‚||_)|j€ |dkr||_dx|_*|_+d|_,|d kr| -¦«dS|dd…dkr| .|||¦«dS| /¦«dS)a$Constructor. Read multipart/* until last part. Arguments, all optional: fp : file pointer; default: sys.stdin.buffer (not used when the request method is GET) Can be : 1. a TextIOWrapper object 2. an object whose read() and readline() methods return bytes headers : header dictionary-like object; default: taken from environ as per CGI spec outerboundary : terminating multipart boundary (for internal use only) 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. limit : used internally to read parts of multipart/form-data forms, to exit from the reading loop when reached. It is the difference between the form content-length and the number of bytes already read encoding, errors : the encoding and error handler used to decode the binary stream to strings. Must be the same as the charset defined for the page sending the form (content-type : meta http-equiv or header) max_num_fields: int. If set, then __init__ throws a ValueError if there are more than n fields read by parse_qsl(). r;r:NÚHEADrBrCrÚsurrogateescapez content-typer?r<r=r@úcontent-lengthz?headers must be mapping or an instance of email.message.MessagerLÚreadlinezfp must be file pointerz#outerboundary must be bytes, not %srzcontent-dispositionr€r‘z text/plainr\r2rwrAé z multipart/)0rSrTÚmax_num_fieldsr>ÚupperÚ qs_on_postrDrNÚencoderÚgetpreferredencodingrrGrrÚ TypeErrorr^rErHrQrrFrr_Úbytesr“r�Ú outerboundaryÚ bytes_readÚlimitr r–r—r€r‘Ú _binary_filer•Ú innerboundaryrIrKrJÚlengthr’r”ÚdoneÚread_urlencodedÚ read_multiÚ read_single)r†rQr^r¦rRrSrTr¨rr_rŸr>ÚmethodrXÚcdisprVrUÚclens r+r‡zFieldStorage.__init__Js|€ð^ˆØ!2ˆÔØ,ˆÔØ,ˆÔØ"ˆŒØ ˜wÐ &Ð &ØÐ-Ô.×4Ò4Ñ6Ô6ˆF؈ŒØ �UŠ?ˆ?˜f¨Ò.Ð.Ø Ð(Ð(ؘ^Ô,��Ý”˜!˜"˜"”ð Ý”X˜a”[��à�Ø—’�6Ô6Ñ8Ô8Ð:KÑLÔLˆBݘ‘”ˆB؈Ø)Ø>ð@�à ˆ?؈GؘÒÐà*M�˜Ñ'Ø Ð(Ð(Ø*1°.Ô*A�˜Ñ'Ø Ð(Ð(Ø")¨.Ô"9�”Ø 7Ð*Ð*Ø,3Ð4DÔ,E�Ð(Ñ)øå˜w­µ'Ð(:Ñ;Ô;ð 9Ýð!8ñ9ô9ð9àˆŒ Ø ˆ:Ý”iÔ&ˆDŒGˆGå ˜�MÑ *Ô *ð Ø”iˆDŒGˆGå˜B Ñ'Ô'ð ;­G°B¸ Ñ,CÔ,Cð ;ÝÐ 9Ñ:Ô:Ð:؈DŒGà ˆŒ ؈Œ å˜-­Ñ/Ô/ð <ÝÐAÝ" =Ñ1Ô1Ô:ñ;ñ<ô<ð <à*ˆÔàˆŒØˆŒ ð˜2ˆuˆØ  D¤LÐ 0Ð 0Ý'¨¬ Ð5JÔ(KÑLÔL‰LˆE�5Ø ˆÔØ#(ˆÔ ؈Œ Ø �Uˆ?ˆ?ؘfœ ˆDŒI؈Œ Ø ˜Ð Ð Ø! *Ô-ˆDŒMØ œM°Ð5ˆÔð ˜Tœ\Ð )Ð )Ý'¨¬ °^Ô(DÑEÔE‰LˆE�5�5Ø Ô ð C 6¨VÒ#3Ð#3Ø'¨�5ˆEˆEà>À�5ˆE؈Œ Ø!ˆÔØ ˜Ð Ð Ø!& zÔ!2×!9Ò!9¸$¼-Ø:>¼+ñ"Gô"GˆDÔ Ð ð"%ˆDÔ àˆØ ˜tœ|Ð +Ð +ð ݘ4œ<Ð(8Ô9Ñ:Ô:��øÝð ð ð Ø�ð øøøåð D˜$¥š-˜-Ý Ð!BÑCÔCÐC؈Œ Ø Œ:Ð  $¨!¢) )؈DŒJà $Ð$ˆŒ �D”I؈Œ Ø Ð7Ò 7Ð 7Ø × Ò Ñ "Ô "Ð "Ð "Ð "Ø �3�B�3ŒZ˜<Ò 'Ð 'Ø �OŠO˜GÐ%6¸Ñ GÔ GÐ GÐ GÐ Gà × Ò Ñ Ô Ð Ð Ð sÌLÌ L,Ì+L,có\— |j ¦«dS#t$rYdSwxYw©N)r”r6ÚAttributeErrorr‹s r+Ú__del__zFieldStorage.__del__ïsA€ð Ø ŒI�OŠOÑ Ô Ð Ð Ð øÝð ð ð Ø ˆDˆDð øøøs ‚� +ª+có—|Sr´r4r‹s r+Ú __enter__zFieldStorage.__enter__õs€Øˆ r2có8—|j ¦«dSr´)r”r6)r†r1s r+Ú__exit__zFieldStorage.__exit__øs€Ø Œ �ŠÑÔÐÐÐr2có8—d|j›d|j›d|j›d�S)z"Return a printable representation.z FieldStorage(r‰rŠ)r€r‘r�r‹s r+rŒzFieldStorage.__repr__ûs)€€ð” � � ˜4œ=˜=˜=¨$¬*¨*¨*ð6ð 6r2cóD—t| ¦«¦«Sr´)ÚiterÚkeysr‹s r+Ú__iter__zFieldStorage.__iter__s€Ý�D—I’I‘K”KÑ Ô Ð r2cóü—|dkrt|¦«‚|jrN|j d¦«|j ¦«}|j d¦«n|j�|j}nd}|S)Nr�r)rµr”ÚseekrLr’r…s r+Ú __getattr__zFieldStorage.__getattr__sz€Ø �7Š?ˆ?Ý  Ñ&Ô&Ð &Ø Œ9ð Ø ŒI�NŠN˜1Ñ Ô Ð Ø”I—N’NÑ$Ô$ˆEØ ŒI�NŠN˜1Ñ Ô Ð Ð Ø ŒYÐ "Ø”IˆEˆEàˆE؈ r2cóâ—|j€td¦«‚g}|jD]"}|j|kr| |¦«Œ#|st |¦«‚t |¦«dkr|dS|S)zDictionary style indexing.Nú not indexablerCr)r’r¤r€Úappendrhro)r†r}ÚfoundÚitems r+Ú __getitem__zFieldStorage.__getitem__s~€à Œ9РݘOÑ,Ô,Ð ,؈ؔIð 4ð 4ˆDØŒy˜CÒР§¢¨dÑ!3Ô!3Ð!3øØð ݘ3‘-”-Ð Ý ˆu‰:Œ:˜Š?ˆ?ؘ”8ˆOàˆLr2cón—||vr0||}t|t¦«r d„|D¦«S|jS|S)z8Dictionary style get() method, including 'value' lookup.có—g|] }|j‘Œ Sr4©r�©rbÚxs r+ú z)FieldStorage.getvalue..#ó€Ð/Ð/Ð/ A˜œÐ/Ð/Ð/r2©rGr’r�©r†r}Údefaultr�s r+ÚgetvaluezFieldStorage.getvaluesG€à �$ˆ;ˆ;ؘ”IˆEݘ%¥Ñ&Ô&ð #Ø/Ð/¨Ð/Ñ/Ô/Ð/à”{Ð"àˆNr2cóp—||vr1||}t|t¦«r |djS|jS|S)z! Return the first value received.rrÐrÑs r+ÚgetfirstzFieldStorage.getfirst)s?€à �$ˆ;ˆ;ؘ”IˆEݘ%¥Ñ&Ô&ð #ؘQ”x”~Ð%à”{Ð"àˆNr2cóp—||vr1||}t|t¦«r d„|D¦«S|jgSgS)z Return list of received values.có—g|] }|j‘Œ Sr4rËrÌs r+rÎz(FieldStorage.getlist..9rÏr2rÐ)r†r}r�s r+razFieldStorage.getlist4sI€à �$ˆ;ˆ;ؘ”IˆEݘ%¥Ñ&Ô&ð %Ø/Ð/¨Ð/Ñ/Ô/Ð/àœ �}Ð$àˆIr2có„—|j€td¦«‚ttd„|jD¦«¦«¦«S)zDictionary style keys() method.NrÄc3ó$K—|] }|jV—Œ dSr´©r€)rbrÇs r+ú z$FieldStorage.keys..Cs$èè€Ð8Ð8 d˜œ Ð8Ð8Ð8Ð8Ð8Ð8r2)r’r¤Úsetr‹s r+r¾zFieldStorage.keys?s?€à Œ9РݘOÑ,Ô,Ð ,Ý•CÐ8Ð8¨d¬iÐ8Ñ8Ô8Ñ8Ô8Ñ9Ô9Ð9r2cóp‡—|j€td¦«‚tˆfd„|jD¦«¦«S)z%Dictionary style __contains__ method.NrÄc3ó.•K—|]}|j‰kV—ŒdSr´rÚ)rbrÇr}s €r+rÛz,FieldStorage.__contains__..Is*øèè€Ð:Ð:¨�4”9 Ò#Ð:Ð:Ð:Ð:Ð:Ð:r2)r’r¤Úany)r†r}s `r+Ú __contains__zFieldStorage.__contains__Es>ø€à Œ9РݘOÑ,Ô,Ð ,ÝÐ:Ð:Ð:Ð:°´ Ð:Ñ:Ô:Ñ:Ô:Ð:r2cóD—t| ¦«¦«S)z Dictionary style len(x) support.)ror¾r‹s r+Ú__len__zFieldStorage.__len__Ks€å�4—9’9‘;”;ÑÔÐr2cóV—|j€td¦«‚t|j¦«S)NzCannot be converted to bool.)r’r¤Úboolr‹s r+Ú__bool__zFieldStorage.__bool__Os'€Ø Œ9Ð ÝÐ:Ñ;Ô;Ð ;Ý�D”I‰ŒÐr2c óþ—|j |j¦«}t|t¦«s+t |j›dt |¦«j›�¦«‚| |j |j ¦«}|j r |d|j zz }tj  ||j|j|j |j |j|j¬¦«}d„|D¦«|_| ¦«dS)z+Internal: read data in query string format.ú should return bytes, got r8©rr_rŸr>có4—g|]\}}t||¦«‘ŒSr4©r ©rbr}r�s r+rÎz0FieldStorage.read_urlencoded..as'€ÐJÐJÐJ±j°c¸5Õ% c¨5Ñ1Ô1ÐJÐJÐJr2N)rQrLr«rGr¥rKr“r�rMrr_r¡rOr Ú parse_qslrSrTrŸr>r’Ú skip_lines)r†rXÚquerys r+r­zFieldStorage.read_urlencodedTsõ€à ŒW�\Š\˜$œ+Ñ &Ô &ˆÝ˜"�eÑ$Ô$ð =ÝØ $¤  ­¨b©¬Ô):Ð):ð<ñ=ô=ð =à �YŠY�t”} d¤kÑ 2Ô 2ˆØ Œ?ð (Ø �#˜œÑ'Ñ 'ˆBÝ” ×&Ò&Ø �Ô&¨Ô(;Ø”]¨4¬;ØÔ.¸$¼.ð'ñJôJˆðKÐJÀEÐJÑJÔJˆŒ Ø �ŠÑÔÐÐÐr2c ó¶—|j}t|¦«std|›�¦«‚g|_|jrmt j |j|j|j |j |j |j |j ¬¦«}|j d„|D¦«¦«|jp|j}|j ¦«}t'|t(¦«s+t|j›dt+|¦«j›�¦«‚|xjt1|¦«z c_| ¦«d|jzkrZ|rX|j ¦«}|xjt1|¦«z c_| ¦«d|jzkr|°X|j }|�|t1|j¦«z} t5¦«} d} |j ¦«} | | z } |  ¦«snŒ4| s�n9|xjt1| ¦«z c_|  |  |j |j ¦«¦«|  ¦«} d | vr| d =|j€dn|j|jz } ||j| ||||| |j |j ||j ¦ « }|�8|d z}|jr|t1|j¦«z}|d krtd ¦«‚|xj|jz c_|j |¦«|j s|j|j!cxkrd krnnn�Œ‚| "¦«dS) z/Internal: read a part that is itself multipart.z$Invalid boundary in multipart form: rèc3ó<K—|]\}}t||¦«V—ŒdSr´rêrës r+rÛz*FieldStorage.read_multi..qs1èè€ÐRÐR¹j¸cÀ5Õ-¨c°5Ñ9Ô9ÐRÐRÐRÐRÐRÐRr2rçó--NTr2rœrCrzMax number of fields exceeded)#rªÚvalid_boundaryrKr’r¡rOr rìrSrTrr_rŸr>ÚextendÚFieldStorageClassÚ __class__rQr�rGr¥r“r�r§rorprÚfeedrMr6r¨rÅr¬r«rí)r†rRrSrTÚibrîÚklassÚ first_linerŸÚparserÚhdr_textÚdatar^r¨Úparts r+r®zFieldStorage.read_multifs�€à Ô ˆÝ˜bÑ!Ô!ð OÝ�*ÈÈÐMÑNÔNÐ N؈Œ Ø Œ?ð SÝ”L×*Ò*Ø” Ô!7¸Ô9LØœ¨t¬{Ø#Ô2¸d¼nð+ñNôNˆEð ŒI× Ò ÐRÐRÈEÐRÑRÔRÑ RÔ RÐ RàÔ&Ð8¨$¬.ˆØ”W×%Ò%Ñ'Ô'ˆ ݘ*¥eÑ,Ô,ð EÝØ $¤  ­¨jÑ)9Ô)9Ô)BÐ)BðDñEôEð Eà ˆŒ�3˜z™?œ?Ñ*ˆŒð×ÒÑ!Ô! e¨dÔ.@Ñ&@ÒAÐAØðBàœ×)Ò)Ñ+Ô+ˆJØ ˆOŒO�s :™œÑ .ˆOŒOð×ÒÑ!Ô! e¨dÔ.@Ñ&@ÒAÐAØðBð Ô,ˆØ Ð %Ø �c $¤)™nœnÑ ,ˆNð# Ý‘\”\ˆF؈Hð Ø”w×'Ò'Ñ)Ô)�ؘDÑ �Ø—z’z‘|”|ðØð  ð ð Ùà ˆOŒO�s 8™}œ}Ñ ,ˆOŒOØ �KŠK˜Ÿš¨¬ °t´{ÑCÔCÑ DÔ DÐ DØ—l’l‘n”nˆGð  7Ð*Ð*ØÐ,Ð-à œJÐ.�D�DØ”Z $¤/Ñ1ð à�5˜œ '¨2¨wÐ8IØ'¨Øœ¨¬ °^ÀTÄ^ñUôUˆDðÐ)Ø !Ñ#�Ø”9ð5Ø"¥c¨$¬)¡n¤nÑ4�NØ! AÒ%Ð%Ý$Ð%DÑEÔEÐEà ˆOŒO˜tœÑ .ˆOŒOØ ŒI× Ò ˜TÑ "Ô "Ð "ØŒyð ˜DœO¨t¬{Ð>Ð>Ò>Ð>¸QÒ>Ð>Ð>Ð>Ð>ØñG# ðH �ŠÑÔÐÐÐr2cóÊ—|jdkr)| ¦«| ¦«n| ¦«|j d¦«dS)zInternal: read an atomic part.rN)r«Ú read_binaryríÚ read_linesr”rÁr‹s r+r¯zFieldStorage.read_single«s^€à Œ;˜!Ò Ð Ø × Ò Ñ Ô Ð Ø �OŠOÑ Ô Ð Ð à �OŠOÑ Ô Ð Ø Œ �Š�qÑÔÐÐÐr2i cóô—| ¦«|_|j}|dkrÏ|dkrË|j t ||j¦«¦«}t|t¦«s+t|j›dt|¦«j ›�¦«‚|xj t|¦«z c_ |s d|_dS|j |¦«|t|¦«z }|dk°ÇdSdSdS)zInternal: read binary data.rrçrwN)Ú make_filer”r«rQrLÚminÚbufsizerGr¥rKr“r�r§ror¬r/)r†Útodorüs r+rÿzFieldStorage.read_binary¶sù€à—N’NÑ$Ô$ˆŒ ØŒ{ˆØ �1Š9ˆ9ؘ’(�(Ø”w—|’|¥C¨¨d¬lÑ$;Ô$;Ñ<Ô<�Ý! $­Ñ.Ô.ðGÝ$Ø(,¬¨¨µ°d±´Ô1DÐ1Dð&FñGôGðGà�”¥3 t¡9¤9Ñ,�”ØðØ "�D”IØ�EØ” —’ Ñ%Ô%Ð%Ø�c $™iœiÑ'�ð˜’(�(�(�(ð ˆ9Ø�(r2cóà—|jrt¦«x|_|_nt ¦«x|_|_|jr| ¦«dS| ¦«dS)z0Internal: read lines until EOF or outerboundary.N)r©rr”Ú_FieldStorage__filerr¦Úread_lines_to_outerboundaryÚread_lines_to_eofr‹s r+rzFieldStorage.read_linesÇsn€à Ô ð 1Ý&-¡i¤iÐ /ˆDŒI˜œ ˜ å&.¡j¤jÐ 0ˆDŒI˜œ Ø Ô ð %Ø × ,Ò ,Ñ .Ô .Ð .Ð .Ð .à × "Ò "Ñ $Ô $Ð $Ð $Ð $r2cóÊ—|j�€|j ¦«t|¦«zdkrS| ¦«|_|j ¦«}|j |¦«d|_|jr|j |¦«dS|j | |j |j ¦«¦«dS)z line is always bytes, not stringNiè) rÚtellrorr”rÓr/r©rMrr_)r†r{rüs r+Ú__writezFieldStorage.__writeÒsÁ€à Œ;Ð "ØŒ{×ÒÑ!Ô!¥C¨¡I¤IÑ-°Ò4Ð4Ø ŸNšNÑ,Ô,�” Ø”{×+Ò+Ñ-Ô-�Ø” —’ Ñ%Ô%Ð%Ø"�” Ø Ô ð Eà ŒI�OŠO˜DÑ !Ô !Ð !Ð !Ð !ð ŒI�OŠO˜DŸKšK¨¬ °t´{ÑCÔCÑ DÔ DÐ DÐ DÐ Dr2có´— |j d¦«}|xjt|¦«z c_|s d|_dS| |¦«ŒX)zInternal: read lines until EOF.rCérwN)rQr�r§ror¬Ú_FieldStorage__write)r†r{s r+r zFieldStorage.read_lines_to_eofás]€ð Ø”7×#Ò# EÑ*Ô*ˆDØ ˆOŒO�s 4™yœyÑ (ˆOŒOØð Ø�” Ø�Ø �LŠL˜Ñ Ô Ð ð  r2cóÈ—d|jz}|dz}d}d}d} |j�d|jcxkr|krnndS|j d¦«}|xjt |¦«z c_|t |¦«z }|s d|_dS|d kr||z}d}| d¦«r-|r+| ¦«}||krdS||kr d|_dS|}|  d ¦«rd }|dd …}d}nL|  d ¦«rd }|dd…}d}n(|  d ¦«rd }|dd…}d }nd}d }|  ||z¦«�ŒM)zžInternal: read lines until outerboundary. Data is read as bytes: boundaries and line ends must be converted to bytes for comparisons. rñr2TrrCNrrwó s éþÿÿÿó F) r¦r¨rQr�r§ror¬Ú startswithÚrstripÚendswithr) r†Ú next_boundaryÚ last_boundaryÚdelimÚlast_line_lfendÚ_readr{Ú strippedlineÚodelims r+rz(FieldStorage.read_lines_to_outerboundaryësÈ€ð  Ô 2Ñ2ˆ Ø%¨Ñ-ˆ ؈؈؈ð& (àŒzÐ%¨!¨t¬zÐ*BÐ*BÒ*BÐ*B¸UÒ*BÐ*BÐ*BÐ*BÐ*BØ�Ø”7×#Ò# EÑ*Ô*ˆDØ ˆOŒO�s 4™yœyÑ (ˆOŒOØ •S˜‘Y”YÑ ˆEØð Ø�” Ø�ؘŠ~ˆ~ؘt‘|�Ø�Ø�Š˜uÑ%Ô%ð ¨/ð Ø#Ÿ{š{™}œ}� Ø =Ò0Ð0Ø�EØ =Ò0Ð0Ø !�D”IØ�E؈FØ�}Š}˜WÑ%Ô%ð (Ø�ؘC˜R˜C”y�Ø"&��Ø—’˜uÑ%Ô%ð (Ø�ؘC˜R˜C”y�Ø"&��Ø—’˜uÑ%Ô%ð (ð�ؘC˜R˜C”y�Ø"'��à�Ø"'�Ø �LŠL˜ $™Ñ 'Ô 'Ð 'ñM& (r2cóz—|jr|jrdSd|jz}|dz}d} |j d¦«}|xjt |¦«z c_|s d|_dS| d¦«r-|r+| ¦«}||krdS||kr d|_dS| d¦«}Œš)z5Internal: skip lines until outer boundary if defined.NrñTrrwrCr)r¦r¬rQr�r§rorrp)r†rrrr{rs r+rízFieldStorage.skip_linessà€àÔ!ð  T¤Yð Ø ˆFØ Ô 2Ñ2ˆ Ø%¨Ñ-ˆ ؈ð 3Ø”7×#Ò# EÑ*Ô*ˆDØ ˆOŒO�s 4™yœyÑ (ˆOŒOØð Ø�” Ø�Ø�}Š}˜UÑ#Ô#ð ¨ð Ø#Ÿzšz™|œ|� Ø =Ò0Ð0Ø�EØ =Ò0Ð0Ø !�D”IØ�EØ"Ÿmšm¨EÑ2Ô2ˆOð 3r2cóp—|jrtjd¦«Stjd|jd¬¦«S)a¯Overridable: 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.)rÚnewline)r©ÚtempfileÚ TemporaryFilerr‹s r+rzFieldStorage.make_file3sC€ð0 Ô ð 8ÝÔ)¨%Ñ0Ô0Ð 0åÔ)¨$Øœ°$ð8ñ8ô8ð 8r2r´)!r�rŽr�r�ÚosrRr‡r¶r¸rºrŒr¿rÂrÈrÓrÕrar¾ràrârår­rôr®r¯rrÿrrr rrírr4r2r+r r s߀€€€€ð(ð(ðR¨¸CØœ°qÈØ g°iØ $°ðcðcðcðcðJððð ðððððð6ð6ð6ð !ð!ð!ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð:ð:ð:ð ;ð;ð;ð  ð ð ðððð ððð ÐðCðCðCðJððð€Gð(ð(ð(ð" %ð %ð %ð Eð Eð Eðððð0(ð0(ð0(ðd3ð3ð3ð,8ð8ð8ð8ð8r2r cóh—td¦«t¦«tjt_ t ¦«}t ¦«t ¦«t|¦«t|¦«t¦«d„}|fd„}td¦«|¦«n#t¦«YnxYwtd¦«da t ¦«}t ¦«t ¦«t|¦«t|¦«dS#t¦«YdSxYw)z—Robust 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/htmlcó$—td¦«dS)Nz,testing print_exception() -- italics?)Úexecr4r2r+rsztest..ffs€Ý Ð?Ñ @Ô @Ð @Ð @Ð @r2có—|¦«dSr´r4)rss r+Úgztest..ghs€Ø ˆA‰CŒCˆCˆCˆCr2z9

What follows is a test, not an actual exception:

z*

Second try with a small maxlen...

é2N) ÚprintrDÚstdoutÚstderrr rrrrrrrJ)rRÚformrsr(s r+rrUsO€õ Ð #Ñ$Ô$Ð$Ý �G„G€GÝ”…C„Jð݉~Œ~ˆÝÑÔÐÝÑÔÐÝ�4ÑÔÐÝ�gÑÔÐÝÑÔÐð Að Að Aàð ð ð ð å ÐIÑJÔJÐJØ ˆ‰ŒˆˆøðÝÑÔÐÐÐøøøå Ð 6Ñ7Ô7Ð7ð€Fð݉~Œ~ˆÝÑÔÐÝÑÔÐÝ�4ÑÔÐÝ�gÑÔÐÐÐøðÝÑÔÐÐÐÐøøøsµA7B-Â-B?ÃADÄD1c óŒ—|€tj¦«\}}}ddl}t¦«td¦«| ||¦«| ||¦«z}tdt jd |dd…¦«¦«›dt j|d¦«›d�¦«~dS)Nrz+

Traceback (most recent call last):

z
rrwzz
) rDÚexc_infoÚ tracebackr*Ú format_tbÚformat_exception_onlyÚhtmlÚescapeÚjoin)r“r�Útbr¨r0r’s r+rr|sÉ€Ø €|Ýœ,™.œ.‰ˆˆe�RØÐÐÐÝ �G„G€GÝ Ð 7Ñ8Ô8Ð8Ø × Ò ˜r 5Ñ )Ô )Ø × *Ò *¨4°Ñ 7Ô 7ñ 8€Då €EÝ Œ �B—G’G˜D  " œIÑ&Ô&Ñ'Ô'Ð'Ð'Ý Œ �D˜”HÑÔÐÐð ñ ô ð 𠈈r2c ó\—t| ¦«¦«}t¦«td¦«td¦«|D]>}tdtj|¦«dtj||¦«¦«Œ?td¦«t¦«dS)z#Dump the shell environment as HTML.z

Shell Environment:

ú
ú
ú
ú
N)Úsortedr¾r*r3r4)rRr¾r}s r+rrŠs’€å �'—,’,‘.”.Ñ !Ô !€DÝ �G„G€GÝ Ð 'Ñ(Ô(Ð(Ý ˆ&�M„M€MØðKðKˆÝ ˆf•d”k #Ñ&Ô&¨µ´ ¸GÀC¼LÑ0IÔ0IÑJÔJÐJÐJÝ ˆ'�N„N€NÝ �G„G€G€G€Gr2c óL—t| ¦«¦«}t¦«td¦«|std¦«td¦«|D]¥}tdtj|¦«zdzd¬¦«||}tdtjt t |¦«¦«¦«zd z¦«td tjt |¦«¦«z¦«Œ¦td ¦«t¦«d S) z$Dump the contents of a form as HTML.z

Form Contents:

z

No form fields.r8r9ú:ú )rrzzr:r;N)r<r¾r*r3r4Úreprr“)r-r¾r}r�s r+rr•sþ€å �$—)’)‘+”+Ñ Ô €DÝ �G„G€GÝ Ð #Ñ$Ô$Ð$Ø ð$Ý Ð"Ñ#Ô#Ð#Ý ˆ&�M„M€MØð1ð1ˆÝ ˆf•t”{ 3Ñ'Ô'Ñ'¨#Ñ-°3Ð7Ñ7Ô7Ð7Ø�S” ˆÝ ˆe•d”k¥$¥t¨E¡{¤{Ñ"3Ô"3Ñ4Ô4Ñ4°vÑ=Ñ>Ô>Ð>Ý ˆf•t”{¥4¨¡;¤;Ñ/Ô/Ñ/Ñ0Ô0Ð0Ð0Ý ˆ'�N„N€NÝ �G„G€G€G€Gr2c óT—t¦«td¦« tj¦«}ttj|¦«¦«nF#t $r9}tdtjt |¦«¦«¦«Yd}~nd}~wwxYwt¦«dS)z#Dump the current directory as HTML.z#

Current Working Directory:

zOSError:N)r*r#Úgetcwdr3r4r%Ústr)ÚpwdÚmsgs r+rr¥s¦€å �G„G€GÝ Ð /Ñ0Ô0Ð0ð ÝŒi‰kŒkˆõ �dŒk˜#ÑÔÑÔÐÐøõ ð1ð1ð1Ý ˆj�$œ+¥c¨#¡h¤hÑ/Ô/Ñ0Ô0Ð0Ð0Ð0Ð0Ð0Ð0øøøøð1øøøõ �G„G€G€G€GsŸAÁ BÁ/BÂBcóª—t¦«td¦«t¦«ttj¦«t¦«dS)Nz

Command Line Arguments:

)r*rDrNr4r2r+rr±s=€Ý �G„G€GÝ Ð ,Ñ-Ô-Ð-Ý �G„G€GÝ �#Œ(�O„O€OÝ �G„G€G€G€Gr2có$—td¦«dS)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)r*r4r2r+rr¸s#€å ð' ñ'ô'ð'ð'ð'r2cój—ddl}t|t¦«rd}nd}| ||¦«S)Nrs^[ -~]{0,200}[!-~]$z^[ -~]{0,200}[!-~]$)ÚrerGr¥Úmatch)rqrIÚ _vb_patterns r+ròròçs=€Ø €I€I€IÝ�!•UÑÔð,Ø,ˆ ˆ à+ˆ Ø �8Š8�K Ñ #Ô #Ð#r2Ú__main__)rYrZr8)NNNN).r�Ú __version__ÚiorrrÚcollections.abcrrDr#Ú urllib.parserOÚ email.parserrÚ email.messagerr3rr!rÚ__all__Ú _deprecatedr�r"r#r,r(r&r7r'rJrRr r rtr r r rrrrrrrròr4r2r+úrUs©ðð ð ð*€ ð 0Ð/Ð/Ð/Ð/Ð/Ð/Ð/Ð/Ð/Ø#Ð#Ð#Ð#Ð#Ð#Ø € € € Ø € € € ØÐÐÐØ#Ð#Ð#Ð#Ð#Ð#Ø!Ð!Ð!Ð!Ð!Ð!Ø € € € Ø € € € Ø€€€Ø€€€ð "ð "ð "€ð €Ô�X fÐ-Ñ-Ô-Ð-ð €Ø €ð#ð#ð#ðJ!ð!ð!ð ð ð ðððð€ð €à ˜2œ:¸Ø cðCIðCIðCIðCIðL*ð*ð*ð*ð6 ð ð ðððð0DðDðDðDðDñDôDðDð2p8ðp8ðp8ðp8ðp8ñp8ôp8ðp8ðl”ð%ð%ð%ð%ðN  ð  ð  ð  ðœ*ð  ð  ð  ð  ð ð ð ð  ð  ð  ð ð ð ð)ð)ð)ð^$ð$ð$ð ˆzÒÐØ€D�F„F€F€F€FðÐr2