Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
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
django
Commits
f08e739b
Kaydet (Commit)
f08e739b
authored
Ock 11, 2013
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #19585 -- Fixed loading cookie value as a dict
This regression was introduced by the 'unicode_literals' patch.
üst
4e2e8f39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
cookie.py
django/http/cookie.py
+4
-1
tests.py
tests/regressiontests/httpwrappers/tests.py
+4
-0
No files found.
django/http/cookie.py
Dosyayı görüntüle @
f08e739b
from
__future__
import
absolute_import
,
unicode_literals
from
django.utils.encoding
import
force_str
from
django.utils
import
six
from
django.utils.six.moves
import
http_cookies
...
...
@@ -48,7 +49,9 @@ else:
if
not
_cookie_allows_colon_in_names
:
def
load
(
self
,
rawdata
):
self
.
bad_cookies
=
set
()
super
(
SimpleCookie
,
self
)
.
load
(
force_str
(
rawdata
))
if
not
six
.
PY3
and
isinstance
(
rawdata
,
six
.
text_type
):
rawdata
=
force_str
(
rawdata
)
super
(
SimpleCookie
,
self
)
.
load
(
rawdata
)
for
key
in
self
.
bad_cookies
:
del
self
[
key
]
...
...
tests/regressiontests/httpwrappers/tests.py
Dosyayı görüntüle @
f08e739b
...
...
@@ -588,3 +588,7 @@ class CookieTests(unittest.TestCase):
c
[
'name'
][
'httponly'
]
=
True
self
.
assertTrue
(
c
[
'name'
][
'httponly'
])
def
test_load_dict
(
self
):
c
=
SimpleCookie
()
c
.
load
({
'name'
:
'val'
})
self
.
assertEqual
(
c
[
'name'
]
.
value
,
'val'
)
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