<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
ž
¬ÿf/;  c               @   sN  d  Z  d g Z d d l Z d d l Z d d l Z e j d ƒ Z e j d ƒ Z Gd d „  d e ƒ Z	 d d	 „  Z
 d
 d „  Z d d „  Z Gd d „  d ƒ Z Gd d „  d ƒ Z Gd d „  d ƒ Z Gd d „  d ƒ Z Gd d „  d ƒ Z d d „  Z d d „  Z d d „  Z d d „  Z d d  „  Z d! d" „  Z d# d$ „  Z d% d& „  Z d S('   u&  
Middleware to check for obedience to the WSGI specification.

Some of the things this checks:

* Signature of the application and start_response (including that
  keyword arguments are not used).

* Environment checks:

  - Environment is a dictionary (and not a subclass).

  - That all the required keys are in the environment: REQUEST_METHOD,
    SERVER_NAME, SERVER_PORT, wsgi.version, wsgi.input, wsgi.errors,
    wsgi.multithread, wsgi.multiprocess, wsgi.run_once

  - That HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH are not in the
    environment (these headers should appear as CONTENT_LENGTH and
    CONTENT_TYPE).

  - Warns if QUERY_STRING is missing, as the cgi module acts
    unpredictably in that case.

  - That CGI-style variables (that don't contain a .) have
    (non-unicode) string values

  - That wsgi.version is a tuple

  - That wsgi.url_scheme is 'http' or 'https' (@@: is this too
    restrictive?)

  - Warns if the REQUEST_METHOD is not known (@@: probably too
    restrictive).

  - That SCRIPT_NAME and PATH_INFO are empty or start with /

  - That at least one of SCRIPT_NAME or PATH_INFO are set.

  - That CONTENT_LENGTH is a positive integer.

  - That SCRIPT_NAME is not '/' (it should be '', and PATH_INFO should
    be '/').

  - That wsgi.input has the methods read, readline, readlines, and
    __iter__

  - That wsgi.errors has the methods flush, write, writelines

* The status is a string, contains a space, starts with an integer,
  and that integer is in range (> 100).

* That the headers is a list (not a subclass, not another kind of
  sequence).

* That the items of the headers are tuples of strings.

* That there is no 'status' header (that is used in CGI, but not in
  WSGI).

* That the headers don't contain newlines or colons, end in _ or -, or
  contain characters codes below 037.

* That Content-Type is given if there is content (CGI often has a
  default content type, but WSGI does not).

* That no Content-Type is given when there is no content (@@: is this
  too restrictive?)

* That the exc_info argument to start_response is a tuple or None.

* That all calls to the writer are with strings, and no other methods
  on the writer are accessed.

* That wsgi.input is used properly:

  - .read() is called with zero or one argument

  - That it returns a string

  - That readline, readlines, and __iter__ return strings

  - That .close() is not called

  - No other methods are provided

* That wsgi.errors is used properly:

  - .write() and .writelines() is called with a string

  - That .close() is not called, and no other methods are provided.

* The response iterator:

  - That it is not a string (it should be a list of a single string; a
    string will work, but perform horribly).

  - That .__next__() returns a string

  - That the iterator is not iterated over until start_response has
    been called (that can signal either a server or application
    error).

  - That .close() is called (doesn't raise exception, only prints to
    sys.stderr, because we only know it isn't called when the object
    is garbage collected).
u	   validatori    Nu   ^[a-zA-Z][a-zA-Z0-9\-_]*$u   [\000-\037]c             B   s   |  Ee  Z d  Z d Z d S(   u   WSGIWarningu:   
    Raised in response to WSGI-spec-related warnings
    N(   u   __name__u
   __module__u   __qualname__u   __doc__(   u
   __locals__(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   WSGIWarningy   s   u   WSGIWarningc             G   s   |  s t  | Œ  ‚ n  d  S(   N(   u   AssertionError(   u   condu   args(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   assert_~   s    u   assert_c             C   s8   t  |  ƒ t k r |  St d j | t |  ƒ ƒ ƒ ‚ d  S(   Nu!   {0} must be of type str (got {1})(   u   typeu   stru   AssertionErroru   formatu   repr(   u   valueu   title(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_string_type‚   s    u   check_string_typec                s   ‡  f d d †  } | S(   u®  
    When applied between a WSGI server and a WSGI application, this
    middleware will check for WSGI compliancy on a number of levels.
    This middleware does not modify the request or response in any
    way, but will raise an AssertionError if anything seems off
    (except for a failure to close the application iterator, which
    will be printed to stderr -- there's no way to raise an exception
    at that point).
    c                 sÅ   t  t |  ƒ d k d ƒ t  | d ƒ |  \ } ‰  t | ƒ g  ‰ ‡  ‡ f d d †  } t | d ƒ | d <t | d ƒ | d <ˆ | | ƒ } t  | d  k	 o§ | d	 k d ƒ t | ƒ t | ˆ ƒ S(
   Ni   u   Two arguments requiredu   No keyword arguments allowedc                 sÁ   t  t |  ƒ d k p$ t |  ƒ d k d |  f ƒ t  | d ƒ |  d } |  d } t |  ƒ d k rs |  d } n d  } t | ƒ t | ƒ t | | ƒ t | ƒ ˆ j d  ƒ t ˆ  |  Œ  ƒ S(   Ni   i   u   Invalid number of arguments: %su   No keyword arguments allowedi    i   (	   u   assert_u   lenu   Noneu   check_statusu   check_headersu   check_content_typeu   check_exc_infou   appendu   WriteWrapper(   u   argsu   kwu   statusu   headersu   exc_info(   u   start_responseu   start_response_started(    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   start_response_wrapperŸ   s    $




u;   validator.<locals>.lint_app.<locals>.start_response_wrapperu
   wsgi.inputu   wsgi.errorsu>   The application must return an iterator, if only an empty listF(	   u   assert_u   lenu   check_environu   InputWrapperu   ErrorWrapperu   Noneu   Falseu   check_iteratoru   IteratorWrapper(   u   argsu   kwu   environu   start_response_wrapperu   iterator(   u   application(   u   start_responseu   start_response_startedu5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   lint_app”   s    

u   validator.<locals>.lint_app(    (   u   applicationu   lint_app(    (   u   applicationu5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu	   validatorˆ   s    )c             B   s\   |  Ee  Z d  Z d d „  Z d d „  Z d d „  Z d d „  Z d	 d
 „  Z d d „  Z d S(   u   InputWrapperc             C   s   | |  _  d  S(   N(   u   input(   u   selfu
   wsgi_input(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __init__Á   s    u   InputWrapper.__init__c             G   sB   t  t | ƒ d k ƒ |  j j | Œ  } t  t | ƒ t k ƒ | S(   Ni   (   u   assert_u   lenu   inputu   readu   typeu   bytes(   u   selfu   argsu   v(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   readÄ   s    u   InputWrapper.readc             G   sB   t  t | ƒ d k ƒ |  j j | Œ  } t  t | ƒ t k ƒ | S(   Ni   (   u   assert_u   lenu   inputu   readlineu   typeu   bytes(   u   selfu   argsu   v(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   readlineÊ   s    u   InputWrapper.readlinec             G   si   t  t | ƒ d k ƒ |  j j | Œ  } t  t | ƒ t k ƒ x$ | D] } t  t | ƒ t k ƒ qE W| S(   Ni   (   u   assert_u   lenu   inputu	   readlinesu   typeu   listu   bytes(   u   selfu   argsu   linesu   line(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu	   readlinesÐ   s    u   InputWrapper.readlinesc             c   s%   x |  j  ƒ  } | s d  S| Vq d  S(   N(   u   readline(   u   selfu   line(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __iter__Ø   s
    u   InputWrapper.__iter__c             C   s   t  d d ƒ d  S(   Ni    u    input.close() must not be called(   u   assert_(   u   self(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   closeß   s    u   InputWrapper.closeN(	   u   __name__u
   __module__u   __qualname__u   __init__u   readu   readlineu	   readlinesu   __iter__u   close(   u
   __locals__(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   InputWrapper¿   s   u   InputWrapperc             B   sP   |  Ee  Z d  Z d d „  Z d d „  Z d d „  Z d d „  Z d	 d
 „  Z d S(   u   ErrorWrapperc             C   s   | |  _  d  S(   N(   u   errors(   u   selfu   wsgi_errors(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __init__ä   s    u   ErrorWrapper.__init__c             C   s*   t  t | ƒ t k ƒ |  j j | ƒ d  S(   N(   u   assert_u   typeu   stru   errorsu   write(   u   selfu   s(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   writeç   s    u   ErrorWrapper.writec             C   s   |  j  j ƒ  d  S(   N(   u   errorsu   flush(   u   self(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   flushë   s    u   ErrorWrapper.flushc             C   s"   x | D] } |  j  | ƒ q Wd  S(   N(   u   write(   u   selfu   sequ   line(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu
   writelinesî   s    u   ErrorWrapper.writelinesc             C   s   t  d d ƒ d  S(   Ni    u!   errors.close() must not be called(   u   assert_(   u   self(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   closeò   s    u   ErrorWrapper.closeN(   u   __name__u
   __module__u   __qualname__u   __init__u   writeu   flushu
   writelinesu   close(   u
   __locals__(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   ErrorWrapperâ   s
   u   ErrorWrapperc             B   s,   |  Ee  Z d  Z d d „  Z d d „  Z d S(   u   WriteWrapperc             C   s   | |  _  d  S(   N(   u   writer(   u   selfu   wsgi_writer(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __init__÷   s    u   WriteWrapper.__init__c             C   s'   t  t | ƒ t k ƒ |  j | ƒ d  S(   N(   u   assert_u   typeu   bytesu   writer(   u   selfu   s(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __call__ú   s    u   WriteWrapper.__call__N(   u   __name__u
   __module__u   __qualname__u   __init__u   __call__(   u
   __locals__(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   WriteWrapperõ   s   u   WriteWrapperc             B   s,   |  Ee  Z d  Z d d „  Z d d „  Z d S(   u   PartialIteratorWrapperc             C   s   | |  _  d  S(   N(   u   iterator(   u   selfu   wsgi_iterator(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __init__   s    u   PartialIteratorWrapper.__init__c             C   s   t  |  j d  ƒ S(   N(   u   IteratorWrapperu   iteratoru   None(   u   self(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __iter__  s    u   PartialIteratorWrapper.__iter__N(   u   __name__u
   __module__u   __qualname__u   __init__u   __iter__(   u
   __locals__(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   PartialIteratorWrapperþ   s   u   PartialIteratorWrapperc             B   sP   |  Ee  Z d  Z d d „  Z d d „  Z d d „  Z d d „  Z d	 d
 „  Z d S(   u   IteratorWrapperc             C   s.   | |  _  t | ƒ |  _ d |  _ | |  _ d  S(   NF(   u   original_iteratoru   iteru   iteratoru   Falseu   closedu   check_start_response(   u   selfu   wsgi_iteratoru   check_start_response(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __init__	  s    		u   IteratorWrapper.__init__c             C   s   |  S(   N(    (   u   self(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __iter__  s    u   IteratorWrapper.__iter__c             C   sx   t  |  j d ƒ t |  j ƒ } t | ƒ t k	 rI t  d d | f ƒ n  |  j d  k	 rt t  |  j d ƒ d  |  _ n  | S(   Nu   Iterator read after closedu$   Iterator yielded non-bytestring (%r)uj   The application returns and we started iterating over its body, but start_response has not yet been calledF(	   u   assert_u   closedu   nextu   iteratoru   typeu   bytesu   Falseu   check_start_responseu   None(   u   selfu   v(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __next__  s    
	u   IteratorWrapper.__next__c             C   s/   d |  _ t |  j d ƒ r+ |  j j ƒ  n  d  S(   Nu   closeT(   u   Trueu   closedu   hasattru   original_iteratoru   close(   u   self(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   close  s    	u   IteratorWrapper.closec             C   s0   |  j  s t j j d ƒ n  t |  j  d ƒ d  S(   Nu/   Iterator garbage collected without being closed(   u   closedu   sysu   stderru   writeu   assert_(   u   self(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   __del__#  s
    		
	u   IteratorWrapper.__del__N(   u   __name__u
   __module__u   __qualname__u   __init__u   __iter__u   __next__u   closeu   __del__(   u
   __locals__(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   IteratorWrapper  s
   u   IteratorWrapperc          	   C   s›  t  t |  ƒ t k d t |  ƒ |  f ƒ xC d d d d d d d d	 d
 g	 D]  } t  | |  k d | f ƒ qK Wx; d d g D]- } t  | |  k d | | d d  … f ƒ q| Wd |  k rÌ t j d t ƒ n  x^ |  j ƒ  D]P } d | k rñ qÙ n  t  t |  | ƒ t k d | t |  | ƒ |  | f ƒ qÙ Wt  t |  d ƒ t k d |  d f ƒ t  |  d d+ k d |  d ƒ t	 |  d ƒ t
 |  d ƒ |  d d, k r»t j d  |  d t ƒ n  t  |  j d! ƒ pÞ|  d! j d" ƒ d# |  d! ƒ t  |  j d$ ƒ p|  d$ j d" ƒ d% |  d$ ƒ |  j d& ƒ rVt  t |  d& ƒ d' k d( |  d& ƒ n  |  j d! ƒ s{t  d$ |  k d) ƒ n  t  |  j d! ƒ d" k d* ƒ d  S(-   Nu:   Environment is not of the right type: %r (environment: %r)u   REQUEST_METHODu   SERVER_NAMEu   SERVER_PORTu   wsgi.versionu
   wsgi.inputu   wsgi.errorsu   wsgi.multithreadu   wsgi.multiprocessu   wsgi.run_onceu$   Environment missing required key: %ru   HTTP_CONTENT_TYPEu   HTTP_CONTENT_LENGTHu8   Environment should not have the key: %s (use %s instead)i   u   QUERY_STRINGu’   QUERY_STRING is not in the WSGI environment; the cgi module will use sys.argv when this variable is missing, so application errors are more likelyu   .u9   Environmental variable %s is not a string: %r (value: %r)u#   wsgi.version should be a tuple (%r)u   wsgi.url_schemeu   httpu   httpsu   wsgi.url_scheme unknown: %ru   GETu   HEADu   POSTu   OPTIONSu   PUTu   DELETEu   TRACEu   Unknown REQUEST_METHOD: %ru   SCRIPT_NAMEu   /u$   SCRIPT_NAME doesn't start with /: %ru	   PATH_INFOu"   PATH_INFO doesn't start with /: %ru   CONTENT_LENGTHi    u   Invalid CONTENT_LENGTH: %rug   One of SCRIPT_NAME or PATH_INFO are required (PATH_INFO should at least be '/' if SCRIPT_NAME is empty)uO   SCRIPT_NAME cannot be '/'; it should instead be '', and PATH_INFO should be '/'(   u   httpu   https(   u   GETu   HEADu   POSTu   OPTIONSu   PUTu   DELETEu   TRACE(   u   assert_u   typeu   dictu   warningsu   warnu   WSGIWarningu   keysu   stru   tupleu   check_inputu   check_errorsu   getu
   startswithu   int(   u   environu   key(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_environ*  s`    	
#	

u   check_environc             C   sA   x: d d d d g D]& } t  t |  | ƒ d |  | f ƒ q Wd  S(   Nu   readu   readlineu	   readlinesu   __iter__u-   wsgi.input (%r) doesn't have the attribute %s(   u   assert_u   hasattr(   u
   wsgi_inputu   attr(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_inputk  s    u   check_inputc             C   s>   x7 d d d g D]& } t  t |  | ƒ d |  | f ƒ q Wd  S(   Nu   flushu   writeu
   writelinesu.   wsgi.errors (%r) doesn't have the attribute %s(   u   assert_u   hasattr(   u   wsgi_errorsu   attr(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_errorsq  s    u   check_errorsc             C   s¢   t  |  d ƒ }  |  j d  d ƒ d } t t | ƒ d k d | ƒ t | ƒ } t | d k d | ƒ t |  ƒ d k  s‡ |  d d	 k rž t j d
 |  t ƒ n  d  S(   Nu   Statusi   i    i   u)   Status codes must be three characters: %rid   u   Status code is invalid: %ri   u    uj   The status string (%r) should be a three-digit integer followed by a single space and a status explanation(	   u   check_string_typeu   splitu   Noneu   assert_u   lenu   intu   warningsu   warnu   WSGIWarning(   u   statusu   status_codeu
   status_int(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_statusw  s    "u   check_statusc          	   C   s}  t  t |  ƒ t k d |  t |  ƒ f ƒ i  } xG|  D]?} t  t | ƒ t k d | t | ƒ f ƒ t  t | ƒ d k ƒ | \ } } t | d ƒ } t | d ƒ } t  | j ƒ  d k d | ƒ d  | | j ƒ  <t  d | k oê d	 | k d
 | ƒ t  t j	 | ƒ d | ƒ t  | j
 d ƒ o/| j
 d ƒ d | ƒ t j	 | ƒ r6 t  d d | t j	 | ƒ j d ƒ f ƒ q6 q6 Wd  S(   Nu%   Headers (%r) must be of type list: %ru1   Individual headers (%r) must be of type tuple: %ri   u   Header nameu   Header valueu   statusuy   The Status header cannot be used; it conflicts with CGI script, and HTTP status is not given through headers (value: %r).u   
u   :u,   Header names may not contain ':' or '\n': %ru   Bad header name: %ru   -u   _u#   Names may not end in '-' or '_': %ri    u#   Bad header value: %r (bad char: %r)(   u   assert_u   typeu   listu   tupleu   lenu   check_string_typeu   loweru   Noneu	   header_reu   searchu   endswithu   bad_header_value_reu   group(   u   headersu   header_namesu   itemu   nameu   value(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_headers…  s0     	u   check_headersc             C   s±   t  |  d ƒ }  t |  j d  d ƒ d ƒ } d
 } xY | D]Q \ } } t  | d ƒ } | j ƒ  d k r8 | | k ru d  St d d | ƒ q8 q8 W| | k r­ t d d	 | ƒ n  d  S(   Nu   Statusi   i    iÌ   i0  u   Header nameu   content-typeuJ   Content-Type header found in a %s response, which must not return content.u,   No Content-Type header found in headers (%s)(   iÌ   i0  (   u   check_string_typeu   intu   splitu   Noneu   loweru   assert_(   u   statusu   headersu   codeu   NO_MESSAGE_BODYu   nameu   value(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_content_type   s    	u   check_content_typec             C   s9   t  |  d  k p t |  ƒ t k d |  t |  ƒ f ƒ d  S(   Nu    exc_info (%r) is not a tuple: %r(   u   assert_u   Noneu   typeu   tuple(   u   exc_info(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_exc_info°  s    u   check_exc_infoc             C   s!   t  t |  t t f ƒ d ƒ d  S(   Nuw   You should not return a string as your application iterator, instead return a single-item list containing a bytestring.(   u   assert_u
   isinstanceu   stru   bytes(   u   iterator(    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   check_iteratorµ  s    u   check_iterator(   u   __doc__u   __all__u   reu   sysu   warningsu   compileu	   header_reu   bad_header_value_reu   Warningu   WSGIWarningu   assert_u   check_string_typeu	   validatoru   InputWrapperu   ErrorWrapperu   WriteWrapperu   PartialIteratorWrapperu   IteratorWrapperu   check_environu   check_inputu   check_errorsu   check_statusu   check_headersu   check_content_typeu   check_exc_infou   check_iterator(    (    (    u5   /opt/alt/python33/lib64/python3.3/wsgiref/validate.pyu   <module>n   s.   	7#		#A