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
d77133b4
Kaydet (Commit)
d77133b4
authored
Nis 17, 2016
tarafından
Martin Panter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #26717: Merge wsgiref fix from 3.5
üst
528619b6
50dd1f7d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
1 deletion
+29
-1
test_wsgiref.py
Lib/test/test_wsgiref.py
+24
-0
simple_server.py
Lib/wsgiref/simple_server.py
+1
-1
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_wsgiref.py
Dosyayı görüntüle @
d77133b4
from
unittest
import
mock
from
unittest
import
TestCase
from
wsgiref.util
import
setup_testing_defaults
from
wsgiref.headers
import
Headers
...
...
@@ -221,6 +222,29 @@ class IntegrationTests(TestCase):
b
"data"
,
out
)
def
test_cp1252_url
(
self
):
def
app
(
e
,
s
):
s
(
"200 OK"
,
[
(
"Content-Type"
,
"text/plain"
),
(
"Date"
,
"Wed, 24 Dec 2008 13:29:32 GMT"
),
])
# PEP3333 says environ variables are decoded as latin1.
# Encode as latin1 to get original bytes
return
[
e
[
"PATH_INFO"
]
.
encode
(
"latin1"
)]
out
,
err
=
run_amock
(
validator
(
app
),
data
=
b
"GET /
\x80
%80
HTTP/1.0"
)
self
.
assertEqual
(
[
b
"HTTP/1.0 200 OK"
,
mock
.
ANY
,
b
"Content-Type: text/plain"
,
b
"Date: Wed, 24 Dec 2008 13:29:32 GMT"
,
b
""
,
b
"/
\x80\x80
"
,
],
out
.
splitlines
())
class
UtilityTests
(
TestCase
):
...
...
Lib/wsgiref/simple_server.py
Dosyayı görüntüle @
d77133b4
...
...
@@ -82,7 +82,7 @@ class WSGIRequestHandler(BaseHTTPRequestHandler):
else
:
path
,
query
=
self
.
path
,
''
env
[
'PATH_INFO'
]
=
urllib
.
parse
.
unquote
_to_bytes
(
path
)
.
decode
(
'iso-8859-1'
)
env
[
'PATH_INFO'
]
=
urllib
.
parse
.
unquote
(
path
,
'iso-8859-1'
)
env
[
'QUERY_STRING'
]
=
query
host
=
self
.
address_string
()
...
...
Misc/ACKS
Dosyayı görüntüle @
d77133b4
...
...
@@ -1385,6 +1385,7 @@ Nir Soffer
Paul Sokolovsky
Evgeny Sologubov
Cody Somerville
Anthony Sottile
Edoardo Spadolini
Geoffrey Spear
Clay Spence
...
...
Misc/NEWS
Dosyayı görüntüle @
d77133b4
...
...
@@ -245,6 +245,9 @@ Core and Builtins
Library
-------
-
Issue
#
26717
:
Stop
encoding
Latin
-
1
-
ized
WSGI
paths
with
UTF
-
8.
Patch
by
Anthony
Sottile
.
-
Issue
#
26782
:
Add
STARTUPINFO
to
subprocess
.
__all__
on
Windows
.
-
Issue
#
26404
:
Add
context
manager
to
socketserver
.
Patch
by
Aviv
Palivoda
.
...
...
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