https://github.com/python/cpython/commit/6bc32e23a798a4755ecdff3f553c5d2609aa66d4
commit: 6bc32e23a798a4755ecdff3f553c5d2609aa66d4
branch: 3.13
author: Stan Ulbrych <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-07-05T12:09:10Z
summary:

[3.13] Fix various typos in the `http.server` docs (GH-153089) (#153118)

[3.13] Fix various typos in the `http.server` docs (GH-153089) (GH-153097)

(cherry picked from commit 99b4cdbfa1619a3901f8cf87d3b5fe8d4894e3e7)

Co-authored-by: Bénédikt Tran <[email protected]>

files:
M Doc/library/http.server.rst

diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst
index 57a6f1511963bc..c150e3c1f6206c 100644
--- a/Doc/library/http.server.rst
+++ b/Doc/library/http.server.rst
@@ -110,7 +110,7 @@ provides three different variants:
 
    .. attribute:: path
 
-      Contains the request path. If query component of the URL is present,
+      Contains the request path. If the query component of the URL is present,
       then ``path`` includes the query. Using the terminology of :rfc:`3986`,
       ``path`` here includes ``hier-part`` and the ``query``.
 
@@ -160,7 +160,7 @@ provides three different variants:
       Specifies a format string that should be used by :meth:`send_error` 
method
       for building an error response to the client. The string is filled by
       default with variables from :attr:`responses` based on the status code
-      that passed to :meth:`send_error`.
+      passed to :meth:`send_error`.
 
    .. attribute:: error_content_type
 
@@ -208,8 +208,8 @@ provides three different variants:
    .. method:: handle_expect_100()
 
       When an HTTP/1.1 conformant server receives an ``Expect: 100-continue``
-      request header it responds back with a ``100 Continue`` followed by ``200
-      OK`` headers.
+      request header it responds with a ``100 Continue`` followed by ``200 OK``
+      headers.
       This method can be overridden to raise an error if the server does not
       want the client to continue.  For example, the server can choose to send 
``417
       Expectation Failed`` as a response header and ``return False``.
@@ -265,8 +265,8 @@ provides three different variants:
    .. method:: send_response_only(code, message=None)
 
       Sends the response header only, used for the purposes when ``100
-      Continue`` response is sent by the server to the client. The headers not
-      buffered and sent directly the output stream.If the *message* is not
+      Continue`` response is sent by the server to the client. The headers are
+      not buffered and sent directly the output stream. If the *message* is not
       specified, the HTTP message corresponding the response *code*  is sent.
 
       This method does not reject *message* containing CRLF sequences.
@@ -308,7 +308,7 @@ provides three different variants:
       to create custom error logging mechanisms. The *format* argument is a
       standard printf-style format string, where the additional arguments to
       :meth:`log_message` are applied as inputs to the formatting. The client
-      ip address and current date and time are prefixed to every message 
logged.
+      IP address and current date and time are prefixed to every message 
logged.
 
    .. method:: version_string()
 
@@ -443,9 +443,8 @@ provides three different variants:
          Add :func:`mimetypes.guess_file_type` as a fallback.
 
 
-The :class:`SimpleHTTPRequestHandler` class can be used in the following
-manner in order to create a very basic webserver serving files relative to
-the current directory::
+The :class:`SimpleHTTPRequestHandler` class can be used to create a very basic
+webserver serving files relative to the current directory as follows::
 
    import http.server
    import socketserver
@@ -610,13 +609,13 @@ Security considerations
 .. index:: pair: http.server; security
 
 :class:`SimpleHTTPRequestHandler` will follow symbolic links when handling
-requests, this makes it possible for files outside of the specified directory
+requests which makes it possible for files outside of the specified directory
 to be served.
 
 Methods :meth:`BaseHTTPRequestHandler.send_header` and
 :meth:`BaseHTTPRequestHandler.send_response_only` assume sanitized input
 and do not perform input validation such as checking for the presence of CRLF
-sequences. Untrusted input may result in HTTP Header injection attacks.
+sequences. Untrusted input may result in HTTP header injection attacks.
 
 Earlier versions of Python did not scrub control characters from the
 log messages emitted to stderr from ``python -m http.server`` or the

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to