Skip to content

docs(http.server): mention exceptions for content length header #131541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs(http.server): mention exceptions for content length header
  • Loading branch information
vaporoxx committed Mar 21, 2025
commit 57dad63afad17b78f7fa371f3ae0806cb2685024
8 changes: 7 additions & 1 deletion Doc/library/http.server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ provides three different variants:
capabilities for future requests. If set to
``'HTTP/1.1'``, the server will permit HTTP persistent connections;
however, your server *must* then include an accurate ``Content-Length``
header (using :meth:`send_header`) in all of its responses to clients.
header (using :meth:`send_header`) in all of its responses to clients
(with a few exceptions, like the ``1xx`` and ``204`` status codes [#]_).
For backwards compatibility, the setting defaults to ``'HTTP/1.0'``.

.. attribute:: MessageClass
Expand Down Expand Up @@ -562,3 +563,8 @@ server to send nefarious control codes to your terminal.

.. versionchanged:: 3.12
Control characters are scrubbed in stderr logs.

.. rubric:: Footnotes

.. [#] Read more about the ``Content-Length`` header in the relevant RFC:
https://www.rfc-editor.org/rfc/rfc9110#section-8.6
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy