
    g6                     J    d dl mZ d dlmZmZ  G d d      Z G d de      Zy)    )Request)SocketUnreaderIterUnreaderc                   &    e Zd ZdZd Zd Zd ZeZy)ParserNc                     || _         t        |d      rt        |      | _        nt	        |      | _        d | _        || _        d| _        y )Nrecvr   )cfghasattrr   unreaderr   mesgsource_addr	req_count)selfr
   sourcer   s       Q/var/www/django_project/virt/lib/python3.12/site-packages/gunicorn/http/parser.py__init__zParser.__init__   sC    66"*62DM(0DM	&     c                     | S )N )r   s    r   __iter__zParser.__iter__   s    r   c                    | j                   r$| j                   j                         r
t               | j                   rO| j                   j                  j	                  d      }|r(| j                   j                  j	                  d      }|r(| xj
                  dz  c_        | j                  | j                  | j                  | j                  | j
                        | _         | j                   s
t               | j                   S )Ni       )
r   should_closeStopIterationbodyreadr   
mesg_classr
   r   r   )r   datas     r   __next__zParser.__next__   s    99//1/! 9999>>&&t,Dyy~~**40  	!OODHHdmmT=M=Mt~~^	yy/!yyr   )__name__
__module____qualname__r   r   r   r    nextr   r   r   r   r   	   s    J
$ Dr   r   c                       e Zd ZeZy)RequestParserN)r!   r"   r#   r   r   r   r   r   r&   r&   1   s    Jr   r&   N)gunicorn.http.messager   gunicorn.http.unreaderr   r   r   r&   r   r   r   <module>r)      s$   
 * ?% %PF r   