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
6be9589e
Kaydet (Commit)
6be9589e
authored
Ara 09, 2015
tarafından
Derek J. Curtis
Kaydeden (comit)
Tim Graham
Ara 10, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25900 -- Fixed regression in CommonMiddleware ETag support.
üst
5bc88154
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
common.py
django/middleware/common.py
+3
-1
1.9.1.txt
docs/releases/1.9.1.txt
+3
-0
tests.py
tests/middleware/tests.py
+10
-0
No files found.
django/middleware/common.py
Dosyayı görüntüle @
6be9589e
...
...
@@ -120,7 +120,9 @@ class CommonMiddleware(object):
if
response
.
has_header
(
'ETag'
):
return
get_conditional_response
(
request
,
etag
=
response
[
'ETag'
],
# get_conditional_response() requires an unquoted version
# of the response's ETag.
etag
=
response
[
'ETag'
]
.
strip
(
'"'
),
response
=
response
,
)
...
...
docs/releases/1.9.1.txt
Dosyayı görüntüle @
6be9589e
...
...
@@ -19,3 +19,6 @@ Bugfixes
* Fixed a state bug when migrating a ``SeparateDatabaseAndState`` operation
backwards (:ticket:`25896`).
* Fixed a regression in ``CommonMiddleware`` causing ``If-None-Match`` checks
to always return HTTP 200 (:ticket:`25900`).
tests/middleware/tests.py
Dosyayı görüntüle @
6be9589e
...
...
@@ -291,6 +291,16 @@ class CommonMiddlewareTest(SimpleTestCase):
res
=
StreamingHttpResponse
([
'content'
])
self
.
assertFalse
(
CommonMiddleware
()
.
process_response
(
req
,
res
)
.
has_header
(
'ETag'
))
@override_settings
(
USE_ETAGS
=
True
)
def
test_if_none_match
(
self
):
first_req
=
HttpRequest
()
first_res
=
CommonMiddleware
()
.
process_response
(
first_req
,
HttpResponse
(
'content'
))
second_req
=
HttpRequest
()
second_req
.
method
=
'GET'
second_req
.
META
[
'HTTP_IF_NONE_MATCH'
]
=
first_res
[
'ETag'
]
second_res
=
CommonMiddleware
()
.
process_response
(
second_req
,
HttpResponse
(
'content'
))
self
.
assertEqual
(
second_res
.
status_code
,
304
)
# Other tests
@override_settings
(
DISALLOWED_USER_AGENTS
=
[
re
.
compile
(
r'foo'
)])
...
...
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