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
403019b1
Kaydet (Commit)
403019b1
authored
Haz 12, 2006
tarafından
Phillip J. Eby
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Sync w/external release 0.1.2. Please see PEP 360 before making changes to external packages.
üst
6e73aaab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
7 deletions
+90
-7
test_wsgiref.py
Lib/test/test_wsgiref.py
+11
-6
wsgiref.egg-info
Lib/wsgiref.egg-info
+1
-1
handlers.py
Lib/wsgiref/handlers.py
+17
-0
headers.py
Lib/wsgiref/headers.py
+16
-0
simple_server.py
Lib/wsgiref/simple_server.py
+13
-0
util.py
Lib/wsgiref/util.py
+32
-0
validate.py
Lib/wsgiref/validate.py
+0
-0
No files found.
Lib/test/test_wsgiref.py
Dosyayı görüntüle @
403019b1
...
...
@@ -80,7 +80,7 @@ def run_amock(app=hello_app, data="GET / HTTP/1.0\n\n"):
def
compare_generic_iter
(
test
,
make_it
,
match
):
def
compare_generic_iter
(
make_it
,
match
):
"""Utility to compare a generic 2.1/2.2+ iterator with an iterable
If running under Python 2.2+, this tests the iterator using iter()/next(),
...
...
@@ -90,7 +90,7 @@ def compare_generic_iter(test, make_it, match):
it
=
make_it
()
n
=
0
for
item
in
match
:
test
.
assertEqual
(
it
[
n
],
item
)
if
not
it
[
n
]
==
item
:
raise
AssertionError
n
+=
1
try
:
it
[
n
]
...
...
@@ -106,10 +106,15 @@ def compare_generic_iter(test, make_it, match):
else
:
# Only test iter mode under 2.2+
it
=
make_it
()
test
.
assert_
(
iter
(
it
)
is
it
)
if
not
iter
(
it
)
is
it
:
raise
AssertionError
for
item
in
match
:
test
.
assertEqual
(
it
.
next
(),
item
)
test
.
assertRaises
(
StopIteration
,
it
.
next
)
if
not
it
.
next
()
==
item
:
raise
AssertionError
try
:
it
.
next
()
except
StopIteration
:
pass
else
:
raise
AssertionError
(
"Too many items from .next()"
,
it
)
...
...
@@ -203,7 +208,7 @@ class UtilityTests(TestCase):
def
make_it
(
text
=
text
,
size
=
size
):
return
util
.
FileWrapper
(
StringIO
(
text
),
size
)
compare_generic_iter
(
self
,
make_it
,
match
)
compare_generic_iter
(
make_it
,
match
)
it
=
make_it
()
self
.
failIf
(
it
.
filelike
.
closed
)
...
...
Lib/wsgiref.egg-info
Dosyayı görüntüle @
403019b1
Metadata-Version: 1.0
Name: wsgiref
Version: 0.1
Version: 0.1
.2
Summary: WSGI (PEP 333) Reference Library
Author: Phillip J. Eby
Author-email: web-sig@python.org
...
...
Lib/wsgiref/handlers.py
Dosyayı görüntüle @
403019b1
...
...
@@ -473,3 +473,20 @@ class CGIHandler(BaseCGIHandler):
self
,
sys
.
stdin
,
sys
.
stdout
,
sys
.
stderr
,
dict
(
os
.
environ
.
items
()),
multithread
=
False
,
multiprocess
=
True
)
#
Lib/wsgiref/headers.py
Dosyayı görüntüle @
403019b1
...
...
@@ -187,3 +187,19 @@ class Headers:
else
:
parts
.
append
(
_formatparam
(
k
.
replace
(
'_'
,
'-'
),
v
))
self
.
_headers
.
append
((
_name
,
"; "
.
join
(
parts
)))
#
Lib/wsgiref/simple_server.py
Dosyayı görüntüle @
403019b1
...
...
@@ -190,3 +190,16 @@ if __name__ == '__main__':
import
webbrowser
webbrowser
.
open
(
'http://localhost:8000/xyz?abc'
)
httpd
.
handle_request
()
# serve one request, then exit
#
Lib/wsgiref/util.py
Dosyayı görüntüle @
403019b1
...
...
@@ -171,3 +171,35 @@ _hoppish = {
def
is_hop_by_hop
(
header_name
):
"""Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header"""
return
_hoppish
(
header_name
.
lower
())
#
Lib/wsgiref/validate.py
Dosyayı görüntüle @
403019b1
This diff is collapsed.
Click to expand it.
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