Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/django/utils/__pycache__/http.cpython-312.pyc

140 lines
14 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
j<> i<>4<00> <00><><00>ddlZddlZddlZddlmZddlmZmZddlm Z ddl
m Z m Z ddl
m Zddl
mZddlmZdd lmZed
ej(<00>Zd j-<00>Zd Zd ZdZdZdZdZede<18>de<1A>de<1B>de<1D>d<14> <09>Zede<18>de<1A>de<1C>de<1D>d<14> <09>Zede<1A>de<19>de<1D>de<1B>d<18> <09>Z dZ!dZ"dZ#d-d<1C>Z d.d<1D>Z$d<1E>Z%d<1F>Z&d <20>Z'd!<21>Z(d"<22>Z)d#<23>Z*d$<24>Z+d%<25>Z,d&<26>Z-d-d'<27>Z.d-d(<28>Z/d)<29>Z0d*<2A>Z1d+<2B>Z2d,<2C>Z3y)/<2F>N)<01>Error)<02>datetime<6D>timezone<6E><01>
formatdate)<02>quote<74>unquote)<01> urlencode)<01>urlsplit)<01>MultiValueDict)<01>_lazy_re_compilez<65>
\A( # start of string and capture group
(?:W/)? # optional weak indicator
" # opening quote
[^"]* # any sequence of non-quote characters
" # end quote
)\Z # end of string and capture group
z/jan feb mar apr may jun jul aug sep oct nov decz(?P<day>[0-9]{2})z(?P<day>[ 0-9][0-9])z(?P<mon>\w{3})z(?P<year>[0-9]{4})z(?P<year>[0-9]{2})z6(?P<hour>[0-9]{2}):(?P<min>[0-9]{2}):(?P<sec>[0-9]{2})z^\w{3}, <20> z GMT$z
^\w{6,9}, <20>-z^\w{3} <20>$z:/?#[]@z !$&'()*+,;=ic<00><><00>t|t<00>r|j<00>}nt|d<01>r|j <00>}g}|D]<5D>\}}|<04>t d|z<00><00>|rt|t tf<02>r|}nR t|<04>}g}|D]>}|<07>t d|z<00><00>t|t<00>s t |<07>}|j|<07><00>@ |j||f<02><00><>t||<01>S#t
$r|}Y<00>.wxYw)z
A version of Python's urllib.parse.urlencode() function that can operate on
MultiValueDict and non-string values.
<20>itemszjCannot encode None for key '%s' in a query string. Did you mean to pass an empty string or omit the value?) <0B>
isinstancer <00>lists<74>hasattrr<00> TypeError<6F>str<74>bytes<65>iter<65>append<6E>original_urlencode)<08>query<72>doseq<65> query_params<6D>key<65>value<75> query_val<61>itr<74>items <20>@E:\Project\pygoedge\.venv\Lib\site-packages\django/utils/http.pyr
r
+s<00><00>
<12>%<25><1E>(<28><15> <0B> <0B> <0A><05> <10><15><07> <20><15> <0B> <0B> <0A><05><15>L<EFBFBD><1B>
<EFBFBD><03>U<EFBFBD> <10>=<3D><1B>B<01>DG<44>H<01><0E> <0E><17>*<2A>U<EFBFBD>S<EFBFBD>%<25>L<EFBFBD>9<><1D>I<EFBFBD> +<2B><1A>5<EFBFBD>k<EFBFBD><03> <1F> <09><1F>D<EFBFBD><1B>|<7C>'<27>.<2E>03<30>4<><1A><1A>
(<28><04>e<EFBFBD>4<>"<22>4<EFBFBD>y<EFBFBD><04><1D>$<24>$<24>T<EFBFBD>*<2A> <20> <15><1B><1B>S<EFBFBD>)<29>,<2C>-<2D>7<1C>8 <1E>l<EFBFBD>E<EFBFBD> 2<>2<><32>#<1D> "<22>!<21> <09> "<22>s<00>4 C&<02>& C4<05>3C4c<00><00>t|d<01><02>S)aj
Format the time to match the RFC 5322 date format as specified by RFC 9110
Section 5.6.7.
`epoch_seconds` is a floating point number expressed in seconds since the
epoch, in UTC - such as that outputted by time.time(). If set to None, it
defaults to the current time.
Output a string in the format 'Wdy, DD Mon YYYY HH:MM:SS GMT'.
T)<01>usegmtr)<01> epoch_secondss r$<00> http_dater(Ts<00><00> <16>m<EFBFBD>D<EFBFBD> 1<>1<>c <00><><00>tttfD]}|j|<00>}|<02><01>nt d|z<00><00> t |d<00>}|dkrOt jtj<00><05>j}||dzz
}||dzz
dkDr ||dz
z }n||z }tj|dj<00><00>dz}t |d <00>}t |d
<00>}t |d <00>} t |d <00>}
t ||||| |
tj<00> <0A>} t | j<00><00>S#t$r} t d|z<00>| <0C>d} ~ wwxYw)a
Parse a date format as specified by HTTP RFC 9110 Section 5.6.7.
The three formats allowed by the RFC are accepted, even if only the first
one is still in widespread use.
Return an integer expressed in seconds since the epoch, in UTC.
Nz%%r is not in a valid HTTP date format<61>year<61>d)<01>tz<74>2<00>mon<6F><00>day<61>hour<75>min<69>sec)<01>tzinfoz%r is not a valid date)<10> RFC1123_DATE<54> RFC850_DATE<54> ASCTIME_DATE<54>match<63>
ValueError<EFBFBD>intr<00>nowr<00>utcr+<00>MONTHS<48>index<65>lower<65> timestamp<6D> Exception) <0A>date<74>regex<65>mr+<00> current_year<61>current_century<72>monthr1r2r3r4<00>result<6C>excs r$<00>parse_http_daterKbsQ<00><00><1E>{<7B>L<EFBFBD>8<><05> <11>K<EFBFBD>K<EFBFBD><04> <1D><01> <0C>=<3D> <11>9<>
<19>@<40>4<EFBFBD>G<>H<>H<>C<01><12>1<EFBFBD>V<EFBFBD>9<EFBFBD>~<7E><04> <0F>#<23>:<3A>#<23><<3C><<3C>8<EFBFBD><<3C><<3C>8<>=<3D>=<3D>L<EFBFBD>*<2A>l<EFBFBD>S<EFBFBD>.@<40>A<>O<EFBFBD><13>|<7C>c<EFBFBD>)<29>*<2A>R<EFBFBD>/<2F><15><0F>#<23>-<2D>-<2D><04><14><0F>'<27><04><16> <0C> <0C>Q<EFBFBD>u<EFBFBD>X<EFBFBD>^<5E>^<5E>-<2D>.<2E><11>2<><05><11>!<21>E<EFBFBD>(<28>m<EFBFBD><03><12>1<EFBFBD>V<EFBFBD>9<EFBFBD>~<7E><04><11>!<21>E<EFBFBD>(<28>m<EFBFBD><03><11>!<21>E<EFBFBD>(<28>m<EFBFBD><03><19>$<24><05>s<EFBFBD>D<EFBFBD>#<23>s<EFBFBD>8<EFBFBD><<3C><<3C>P<><06><12>6<EFBFBD>#<23>#<23>%<25>&<26>&<26><> <14>C<01><18>1<>D<EFBFBD>8<>9<>s<EFBFBD>B<><42>C<01>s<00>C;D7<00>7 E<03>E<03>Ec<00>8<00> t|<00>S#t$rYywxYw)zK
Same as parse_http_date, but return None if the input is invalid.
N)rKrB)rCs r$<00>parse_http_date_saferM<00>s$<00><00> <0A><1E>t<EFBFBD>$<24>$<24><> <14> <0A> <0C> <0A>s <00>
<00> <03>c<00>L<00>t|<00>dkDr td<02><00>t|d<03>S)zf
Convert a base 36 string to an int. Raise ValueError if the input won't fit
into an int.
<20> zBase36 input too large<67>$)<03>lenr:r;<00><01>ss r$<00> base36_to_intrT<00>s'<00><00> <0B>1<EFBFBD>v<EFBFBD><02>{<7B><18>1<>2<>2<> <0E>q<EFBFBD>"<22>:<3A>r)c<00><><00>d}|dkr td<03><00>|dkr||Sd}|dk7rt|d<04>\}}|||z}|dk7r<01>|S)z&Convert an integer to a base36 string.<2E>$0123456789abcdefghijklmnopqrstuvwxyzrz!Negative base36 conversion input.rP<00>)r:<00>divmod)<04>i<>char_set<65>b36<33>ns r$<00> int_to_base36r]<00>sd<00><00>5<>H<EFBFBD><08>1<EFBFBD>u<EFBFBD><18><<3C>=<3D>=<3D><08>2<EFBFBD>v<EFBFBD><17><01>{<7B><1A>
<0C>C<EFBFBD>
<0B>q<EFBFBD>&<26><15>a<EFBFBD><12>}<7D><04><01>1<EFBFBD><16>q<EFBFBD>k<EFBFBD>C<EFBFBD><1F><03> <0C>q<EFBFBD>&<26> <0F>Jr)c<00>h<00>tj|<00>jd<01>jd<02>S)ze
Encode a bytestring to a base64 string for use in URLs. Strip any trailing
equal signs.
s
=<3D>ascii)<04>base64<36>urlsafe_b64encode<64>rstrip<69>decoderRs r$<00>urlsafe_base64_encoderd<00>s+<00><00>
<12> #<23> #<23>A<EFBFBD> &<26> -<2D> -<2D>f<EFBFBD> 5<> <<3C> <<3C>W<EFBFBD> E<>Er)c<00><><00>|j<00>} tj|jt |<00>t |<00>dzzd<02><00>S#t
t f$r}t|<01><00>d}~wwxYw)zn
Decode a base64 encoded string. Add back any trailing equal signs that
might have been stripped.
<20><00>=N)<08>encoder`<00>urlsafe_b64decode<64>ljustrQ<00> LookupError<6F> BinasciiErrorr:)rS<00>es r$<00>urlsafe_base64_decodern<00>s`<00><00>
<EFBFBD><08><08>
<EFBFBD>A<EFBFBD><1C><15>'<27>'<27><01><07><07><03>A<EFBFBD><06><13>Q<EFBFBD><16>!<21><1A>0C<30>T<EFBFBD>(J<>K<>K<><4B> <17><1D> '<27><1C><18><11>m<EFBFBD><1B><><1C>s<00><A<00>A.<03> A)<03>)A.c<00><><00>|j<00>dk(rdgSd<02>|jd<03>D<00>}|D<00>cgc]
}|s<01>|d<00><02> c}Scc}w)z<>
Parse a string of ETags given in an If-None-Match or If-Match header as
defined by RFC 9110. Return a list of quoted ETags, or ['*'] if all ETags
should be matched.
<20>*c3<00>bK<00>|]'}tj|j<00><00><00><01><00>)y<00>w<01>N)<03>
ETAG_MATCHr9<00>strip)<02>.0<EFBFBD>etags r$<00> <genexpr>zparse_etags.<locals>.<genexpr><3E>s$<00><00><><00>W<>CV<43>4<EFBFBD>
<EFBFBD>(<28>(<28><14><1A><1A><1C>6<>CV<43>s<00>-/<01>,r0)rt<00>split)<03>etag_str<74> etag_matchesr9s r$<00> parse_etagsr|<00>sO<00><00> <10>~<7E>~<7E><17>3<EFBFBD><1E><13>u<EFBFBD> <0C>X<01>8<EFBFBD>><3E>><3E>RU<52>CV<43>W<> <0C>&2<><<3C>l<EFBFBD>U<EFBFBD>e<EFBFBD><05>a<EFBFBD><08>l<EFBFBD><<3C><<3C><><s
<00>A<04>Ac<00>:<00>tj|<00>r|Sd|zS)z<>
If the provided string is already a quoted ETag, return it. Otherwise, wrap
the string in quotes, making it a strong ETag.
z"%s")rsr9)rzs r$<00>
quote_etagr~<00>s"<00><00>
<12><17><17><08>!<21><17><0F><15><08> <20> r)c<00><><00>|sy|j<00>}|ddk(xr|j|<01>xs||ddk(xs||k(S)a4
Return ``True`` if the host is either an exact match or a match
to the wildcard pattern.
Any pattern beginning with a period matches a domain and all of its
subdomains. (e.g. ``.example.com`` matches ``example.com`` and
``foo.example.com``). Anything else is an exact string match.
Fr<00>.r0N)r@<00>endswith)<02>host<73>patterns r$<00>is_same_domainr<6E><00>sS<00><00> <13><14><15>m<EFBFBD>m<EFBFBD>o<EFBFBD>G<EFBFBD><0F><01>
<EFBFBD>c<EFBFBD><19> <<3C> <11>]<5D>]<5D>7<EFBFBD> #<23> :<3A>t<EFBFBD>w<EFBFBD>q<EFBFBD>r<EFBFBD>{<7B>':<3A> <1B> <12>d<EFBFBD>?<3F>r)c<00><><00>|<00>|j<00>}|sy|<01> t<00>}nt|t<00>r|h}t |||<02><02>xrt |j dd<04>||<02><02>S)a<>
Return ``True`` if the url uses an allowed host and a safe scheme.
Always return ``False`` on an empty url.
If ``require_https`` is ``True``, only 'https' will be considered a valid
scheme, as opposed to 'http' and 'https' with the default, ``False``.
Note: "True" doesn't entail that a URL is "safe". It may still be e.g.
quoted incorrectly. Ensure to also use django.utils.encoding.iri_to_uri()
on the path component of untrusted URLs.
F)<01> require_https<70>\<5C>/)rt<00>setrr<00> _url_has_allowed_host_and_scheme<6D>replace)<03>url<72> allowed_hostsr<73>s r$<00>url_has_allowed_host_and_schemer<65><00>sm<00><00> <0B><EFBFBD><11>i<EFBFBD>i<EFBFBD>k<EFBFBD><03> <0E><14><14><1C><1B><05> <0A> <13>M<EFBFBD>3<EFBFBD> '<27>&<26><0F> <0A> ,<2C> <0B>]<5D>-<2D> <06> <06>
*<2A> <0B> <0B> <0B>D<EFBFBD>#<23><1E> <0A>]<5D> <06>r)c<00><><00>|jd<01>st|<00>tkDry t|<00>}|j
s |j rytj|d<00>ddk(ry|j }|j s|j
rd}|rdgnddg}|j
xs|j
|vxr | xs||vS#t$rYywxYw)Nz///Fr<00>C<>http<74>https) <09>
startswithrQ<00>MAX_URL_LENGTHr r:<00>netloc<6F>scheme<6D> unicodedata<74>category)r<>r<>r<><00>url_infor<6F><00> valid_schemess r$r<>r<>s<><00><00> <0B>~<7E>~<7E>e<EFBFBD><1C><03>C<EFBFBD><08>><3E> 9<><15><15><1B>C<EFBFBD>=<3D><08> <14>?<3F>?<3F>x<EFBFBD><EFBFBD><EFBFBD><14><13><1B><1B>C<EFBFBD><01>F<EFBFBD>#<23>A<EFBFBD>&<26>#<23>-<2D><14> <15>_<EFBFBD>_<EFBFBD>F<EFBFBD> <13>?<3F>?<3F>x<EFBFBD><EFBFBD><EFBFBD><17><06>!.<2E>W<EFBFBD>I<EFBFBD>V<EFBFBD>W<EFBFBD>4E<34>M<EFBFBD><18><0F><0F> <1F> C<>8<EFBFBD>?<3F>?<3F>m<EFBFBD>#C<> <06> <12>
<EFBFBD>-<2D>f<EFBFBD> <0A>-<2D><06><>% <16><15><14><15>s<00> C<00> C <03> C c<00>h<00>|jd<01>r dj|jd<01><00>}|S)z<>
If redirecting to an absolute path (two leading slashes), a slash must be
escaped to prevent browsers from handling the path as schemaless and
redirecting to another host.
z//z/%2F{})r<><00>format<61> removeprefix)r<>s r$<00>escape_leading_slashesr<73>2s.<00><00>  <0B>~<7E>~<7E>d<EFBFBD><1B><16>o<EFBFBD>o<EFBFBD>c<EFBFBD>.<2E>.<2E>t<EFBFBD>4<>5<><03> <0E>Jr)c#<00><>K<00>|dddk(r<>|dd}|jd<02>}|dkDro|jdd|<01>|jdd|<01>z
dzrE|jd|dz<00>}|dkDr+|jdd|<01>|jdd|<01>z
dzr<01>E|dkr t|<00>}|d|}|j<00><00><01>||d}|dddk(r<01><>yy<00>w)Nr0<00>;r<00>"<22>\"<22>)<04>find<6E>countrQrt)rS<00>end<6E>fs r$<00> _parseparamr<6D>=s<><00><00><><00>
<0B>B<EFBFBD>Q<EFBFBD>%<25>3<EFBFBD>,<2C> <0A>a<EFBFBD>b<EFBFBD>E<EFBFBD><01><0F>f<EFBFBD>f<EFBFBD>S<EFBFBD>k<EFBFBD><03><11>A<EFBFBD>g<EFBFBD>1<EFBFBD>7<EFBFBD>7<EFBFBD>3<EFBFBD><01>3<EFBFBD>/<2F>!<21>'<27>'<27>%<25><11>C<EFBFBD>2H<32>H<>A<EFBFBD>M<><13>&<26>&<26><13>c<EFBFBD>A<EFBFBD>g<EFBFBD>&<26>C<EFBFBD><12>A<EFBFBD>g<EFBFBD>1<EFBFBD>7<EFBFBD>7<EFBFBD>3<EFBFBD><01>3<EFBFBD>/<2F>!<21>'<27>'<27>%<25><11>C<EFBFBD>2H<32>H<>A<EFBFBD>M<> <0E><11>7<EFBFBD><15>a<EFBFBD>&<26>C<EFBFBD> <0A>d<EFBFBD>s<EFBFBD>G<EFBFBD><01><0F>g<EFBFBD>g<EFBFBD>i<EFBFBD><0F> <0A>c<EFBFBD>d<EFBFBD>G<EFBFBD><01> <0C>B<EFBFBD>Q<EFBFBD>%<25>3<EFBFBD>,<2C>s<00>BC <01>4C <01>
C c<00>P<00>td|z<00>}|j<00>j<00>}i}|D]<5D>}|jd<02>}|dk\s<01>d}|d|j <00>j<00>}|j d<06>r|dd}|j d<08>d k(rd
}||d zdj <00>}t|<08>d k\r;|d|dcxk(rd k(r*nn'|d d}|jd d<0E>jdd <0C>}|r"|jd<08>\} }
}t|| <09><10>}|||<<00><>||fS)zi
Parse a Content-type like header.
Return the main content-type and a dictionary of options.
r<><00>=rFNrp<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'r<>Tr0r<><00>\\r<>r<>)<01>encoding) r<><00>__next__r@r<>rtr<>r<>rQr<>ryr ) <0B>line<6E>partsr<00>pdict<63>prY<00> has_encoding<6E>namer r<><00>langs r$<00>parse_header_parametersr<73>Js/<00><00>
<18><03>d<EFBFBD>
<EFBFBD> #<23>E<EFBFBD>
<0F>.<2E>.<2E>
<1A>
<20>
<20>
"<22>C<EFBFBD> <0E>E<EFBFBD> <12><01> <0A>F<EFBFBD>F<EFBFBD>3<EFBFBD>K<EFBFBD><01> <0C><01>6<EFBFBD> <20>L<EFBFBD><14>R<EFBFBD>a<EFBFBD>5<EFBFBD>;<3B>;<3B>=<3D>&<26>&<26>(<28>D<EFBFBD><13>}<7D>}<7D>S<EFBFBD>!<21><1C>C<EFBFBD>R<EFBFBD>y<EFBFBD><04><14>7<EFBFBD>7<EFBFBD>3<EFBFBD><<3C>1<EFBFBD>$<24>#'<27>L<EFBFBD><15>a<EFBFBD>!<21>e<EFBFBD>g<EFBFBD>J<EFBFBD>$<24>$<24>&<26>E<EFBFBD><12>5<EFBFBD>z<EFBFBD>Q<EFBFBD><EFBFBD>5<EFBFBD><11>8<EFBFBD>u<EFBFBD>R<EFBFBD>y<EFBFBD>#?<3F>C<EFBFBD>#?<3F><1D>a<EFBFBD><02> <0B><05><1D> <0A> <0A>f<EFBFBD>d<EFBFBD>3<>;<3B>;<3B>E<EFBFBD>3<EFBFBD>G<><05><1B>(-<2D> <0B> <0B>C<EFBFBD>(8<>%<25><08>$<24><05><1F><05><08>9<><05><1F>E<EFBFBD>$<24>K<EFBFBD>%<13>& <0F><05>:<3A>r)c<00>><00>|r<>|rdnd} |jd<03>d}d}|rHtj||<01>r2dj |j dd <09>j d
d <0B><00>}nd j t |<01><00>}|<02>d |<05><00>S|ryy#t$rd}Y<00>~wxYw)zq
Construct a Content-Disposition HTTP header value from the given filename
as specified by RFC 6266.
<20>
attachment<EFBFBD>inliner_TFz^[\t \x21-\x7e]*$z filename="{}"r<>r<>r<>r<>zfilename*=utf-8''{}z; N)rh<00>UnicodeEncodeError<6F>rer9r<>r<>r)<06> as_attachment<6E>filename<6D> disposition<6F>is_ascii<69>quotable_characters<72> file_exprs r$<00>content_disposition_headerr<72>hs<><00><00>
<10>&3<>l<EFBFBD><18> <0B> <1D> <14>O<EFBFBD>O<EFBFBD>G<EFBFBD> $<24><1B>H<EFBFBD>3<><1B> <13><02><08><08>!4<>h<EFBFBD>?<3F>'<27>.<2E>.<2E><18> <20> <20><14>v<EFBFBD>.<2E>6<>6<>s<EFBFBD>E<EFBFBD>B<><0E>I<EFBFBD>.<2E>4<>4<>U<EFBFBD>8<EFBFBD>_<EFBFBD>E<>I<EFBFBD><1D><1D>b<EFBFBD><19> <0B>,<2C>,<2C> <16><1B><13><>#"<22> <1D><1C>H<EFBFBD> <1D>s<00>B<00> B<03>B)Frr)4r`r<>r<><00>binasciirrlrr<00> email.utilsr<00> urllib.parserr r
rr <00>django.utils.datastructuresr <00>django.utils.regex_helperr <00>Xrsryr><00>__D<5F>__D2<44>__M<5F>__Y<5F>__Y2<59>__Tr6r7r8<00>RFC3986_GENDELIMS<4D>RFC3986_SUBDELIMSr<53>r(rKrMrTr]rdrnr|r~r<>r<>r<>r<>r<>r<>r<><00>r)r$<00><module>r<>s<00><01> <0A> <09><12>+<2B>'<27>"<22>'<27>8<>!<21>6<>6<><1E><04><07>D<EFBFBD>D<EFBFBD>
<02>
<EFBFBD>
;<3B> @<40> @<40> B<><06><1A><03><1E><04><17><03><1B><03><1C><04>?<3F><03><1F>s<EFBFBD>C<EFBFBD><13>c<EFBFBD> R<>S<> <0C><1E><03>S<EFBFBD>$<24>PS<50>T<>U<> <0B><1F>#<23>t<EFBFBD>S<EFBFBD>#<23> N<>O<> <0C><1D><11>!<21><11><15><0E>&3<>R 2<>%C<01>P <0A>
<16> <0F>F<01> <1C> =<3D>!<21><06>(<06><<06>B<0F>
<14><16><r)