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
6ac7d7c8
Kaydet (Commit)
6ac7d7c8
authored
Eyl 06, 2008
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1638033: add support for httponly on Cookie.Morsel
Reviewer: Benjamin
üst
810f807b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
cookie.rst
Doc/library/cookie.rst
+9
-1
Cookie.py
Lib/Cookie.py
+6
-0
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/cookie.rst
Dosyayı görüntüle @
6ac7d7c8
...
...
@@ -148,7 +148,7 @@ Morsel Objects
--------------
.. class:: Morsel
()
.. class:: Morsel
Abstract a key/value pair, which has some :rfc:`2109` attributes.
...
...
@@ -162,9 +162,17 @@ Morsel Objects
* ``max-age``
* ``secure``
* ``version``
* ``httponly``
The attribute :attr:`httponly` specifies that the cookie is only transfered
in HTTP requests, and is not accessible through JavaScript. This is intended
to mitigate some forms of cross-site scripting.
The keys are case-insensitive.
.. versionadded:: 2.6
The :attr:`httponly` attribute was added.
.. attribute:: Morsel.value
...
...
Lib/Cookie.py
Dosyayı görüntüle @
6ac7d7c8
...
...
@@ -408,6 +408,9 @@ class Morsel(dict):
# For historical reasons, these attributes are also reserved:
# expires
#
# This is an extension from Microsoft:
# httponly
#
# This dictionary provides a mapping from the lowercase
# variant on the left to the appropriate traditional
# formatting on the right.
...
...
@@ -417,6 +420,7 @@ class Morsel(dict):
"domain"
:
"Domain"
,
"max-age"
:
"Max-Age"
,
"secure"
:
"secure"
,
"httponly"
:
"httponly"
,
"version"
:
"Version"
,
}
...
...
@@ -499,6 +503,8 @@ class Morsel(dict):
RA
(
"
%
s=
%
d"
%
(
self
.
_reserved
[
K
],
V
))
elif
K
==
"secure"
:
RA
(
str
(
self
.
_reserved
[
K
]))
elif
K
==
"httponly"
:
RA
(
str
(
self
.
_reserved
[
K
]))
else
:
RA
(
"
%
s=
%
s"
%
(
self
.
_reserved
[
K
],
V
))
...
...
Misc/ACKS
Dosyayı görüntüle @
6ac7d7c8
...
...
@@ -122,6 +122,7 @@ Nicolas Chauvat
Michael Chermside
Albert Chin-A-Young
Adal Chiriliuc
Matt Chisholm
Tom Christiansen
Vadim Chugunov
David Cinege
...
...
Misc/NEWS
Dosyayı görüntüle @
6ac7d7c8
...
...
@@ -56,6 +56,8 @@ C-API
Library
-------
- Issue #1638033: Cookie.Morsel gained the httponly attribute.
- Issue #3535: zipfile couldn't read some zip files larger than 2GB.
- Issue #3776: Deprecate the bsddb package for removal in 3.0.
...
...
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