
    @OOf                     ,    d dl Z d dlmZ  G d d      Zy)    N)httpc                   0    e Zd ZdZdej
                  fdZy)ServerSideEventsz
    Server-Side Events are currently swallowed if there's no streaming,
    see https://github.com/mitmproxy/mitmproxy/issues/4469.

    Until this bug is fixed, this addon warns the user about this.
    flowc                     |j                   sJ |j                   j                  j                  dd      j                  d      }|r-|j                   j                  st        j                  d       y y y )Nzcontent-type ztext/event-streamzmitmproxy currently does not support server side events. As a workaround, you can enable response streaming for such flows: https://github.com/mitmproxy/mitmproxy/issues/4469)responseheadersget
startswithstreamloggingwarning)selfr   is_sses      d/var/www/premiumrankchecker/venv/lib/python3.12/site-packages/mitmproxy/addons/server_side_events.pyr	   zServerSideEvents.response   sb    }}}&&**>2>II
 $--..OO_ /6    N)__name__
__module____qualname____doc__r   HTTPFlowr	    r   r   r   r      s    	T]] 	r   r   )r   	mitmproxyr   r   r   r   r   <module>r      s      r   