Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d250c8d6
Kaydet (Commit)
d250c8d6
authored
Agu 04, 2008
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Silence warnings under -3 triggered by wsgiref.
üst
b646757e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
handlers.py
Lib/wsgiref/handlers.py
+7
-6
headers.py
Lib/wsgiref/headers.py
+2
-2
simple_server.py
Lib/wsgiref/simple_server.py
+1
-1
util.py
Lib/wsgiref/util.py
+2
-2
No files found.
Lib/wsgiref/handlers.py
Dosyayı görüntüle @
d250c8d6
...
...
@@ -17,12 +17,13 @@ except NameError:
d
[
k
]
=
v
return
d
try
:
True
False
except
NameError
:
True
=
not
None
False
=
not
True
# Uncomment for 2.2 compatibility.
#try:
# True
# False
#except NameError:
# True = not None
# False = not True
# Weekday and month names for HTTP date/time formatting; always English!
...
...
Lib/wsgiref/headers.py
Dosyayı görüntüle @
d250c8d6
...
...
@@ -63,7 +63,7 @@ class Headers:
Does *not* raise an exception if the header is missing.
"""
name
=
name
.
lower
()
self
.
_headers
[:]
=
[
kv
for
kv
in
self
.
_headers
if
kv
[
0
]
.
lower
()
<>
name
]
self
.
_headers
[:]
=
[
kv
for
kv
in
self
.
_headers
if
kv
[
0
]
.
lower
()
!=
name
]
def
__getitem__
(
self
,
name
):
"""Get the first header value for 'name'
...
...
@@ -142,7 +142,7 @@ class Headers:
return
self
.
_headers
[:]
def
__repr__
(
self
):
return
"Headers(
%
s)"
%
`self._headers`
return
"Headers(
%
r)"
%
self
.
_headers
def
__str__
(
self
):
"""str() returns the formatted headers, complete with end line,
...
...
Lib/wsgiref/simple_server.py
Dosyayı görüntüle @
d250c8d6
...
...
@@ -169,7 +169,7 @@ def demo_app(environ,start_response):
print
>>
stdout
h
=
environ
.
items
();
h
.
sort
()
for
k
,
v
in
h
:
print
>>
stdout
,
k
,
'='
,
`v`
print
>>
stdout
,
k
,
'='
,
repr
(
v
)
start_response
(
"200 OK"
,
[(
'Content-Type'
,
'text/plain'
)])
return
[
stdout
.
getvalue
()]
...
...
Lib/wsgiref/util.py
Dosyayı görüntüle @
d250c8d6
...
...
@@ -98,7 +98,7 @@ def shift_path_info(environ):
return
None
path_parts
=
path_info
.
split
(
'/'
)
path_parts
[
1
:
-
1
]
=
[
p
for
p
in
path_parts
[
1
:
-
1
]
if
p
and
p
<>
'.'
]
path_parts
[
1
:
-
1
]
=
[
p
for
p
in
path_parts
[
1
:
-
1
]
if
p
and
p
!=
'.'
]
name
=
path_parts
[
1
]
del
path_parts
[
1
]
...
...
@@ -166,7 +166,7 @@ _hoppish = {
'connection'
:
1
,
'keep-alive'
:
1
,
'proxy-authenticate'
:
1
,
'proxy-authorization'
:
1
,
'te'
:
1
,
'trailers'
:
1
,
'transfer-encoding'
:
1
,
'upgrade'
:
1
}
.
has_key
}
.
__contains__
def
is_hop_by_hop
(
header_name
):
"""Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment