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
56d6fdbb
Kaydet (Commit)
56d6fdbb
authored
May 18, 2013
tarafından
bbjay
Kaydeden (comit)
Marc Tamlyn
May 19, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #20452 -- Rename 'headers' to 'header fields'.
üst
413735b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
request-response.txt
docs/ref/request-response.txt
+6
-6
No files found.
docs/ref/request-response.txt
Dosyayı görüntüle @
56d6fdbb
...
...
@@ -578,20 +578,20 @@ streaming response if (and only if) no middleware accesses the
instantiated with an iterator. Django will consume and save the content of
the iterator on first access.
Setting headers
~~~~~~~~~~~~~~~
Setting header
field
s
~~~~~~~~~~~~~~~
~~~~~~
To set or remove a header in your response, treat it like a dictionary::
To set or remove a header
field
in your response, treat it like a dictionary::
>>> response = HttpResponse()
>>> response['Cache-Control'] = 'no-cache'
>>> del response['Cache-Control']
Note that unlike a dictionary, ``del`` doesn't raise ``KeyError`` if the header
doesn't exist.
field
doesn't exist.
HTTP header
s cannot contain newlines. An attempt to set a header containing a
newline character (CR or LF) will raise ``BadHeaderError``
HTTP header
fields cannot contain newlines. An attempt to set a header field
containing a
newline character (CR or LF) will raise ``BadHeaderError``
Telling the browser to treat the response as a file attachment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
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