| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -110,7 +110,7 @@ provides three different variants: | |||
| 110 | 110 | ||
| 111 | 111 | .. attribute:: path | |
| 112 | 112 | ||
| 113 | - Contains the request path. If query component of the URL is present, | ||
| 113 | + Contains the request path. If the query component of the URL is present, | ||
| 114 | 114 | then ``path`` includes the query. Using the terminology of :rfc:`3986`, | |
| 115 | 115 | ``path`` here includes ``hier-part`` and the ``query``. | |
| 116 | 116 | ||
@@ -160,7 +160,7 @@ provides three different variants: | |||
| 160 | 160 | Specifies a format string that should be used by :meth:`send_error` method | |
| 161 | 161 | for building an error response to the client. The string is filled by | |
| 162 | 162 | default with variables from :attr:`responses` based on the status code | |
| 163 | - that passed to :meth:`send_error`. | ||
| 163 | + passed to :meth:`send_error`. | ||
| 164 | 164 | ||
| 165 | 165 | .. attribute:: error_content_type | |
| 166 | 166 | ||
@@ -208,8 +208,8 @@ provides three different variants: | |||
| 208 | 208 | .. method:: handle_expect_100() | |
| 209 | 209 | ||
| 210 | 210 | When an HTTP/1.1 conformant server receives an ``Expect: 100-continue`` | |
| 211 | - request header it responds back with a ``100 Continue`` followed by ``200 | ||
| 212 | - OK`` headers. | ||
| 211 | + request header it responds with a ``100 Continue`` followed by ``200 OK`` | ||
| 212 | + headers. | ||
| 213 | 213 | This method can be overridden to raise an error if the server does not | |
| 214 | 214 | want the client to continue. For example, the server can choose to send ``417 | |
| 215 | 215 | Expectation Failed`` as a response header and ``return False``. | |
@@ -265,8 +265,8 @@ provides three different variants: | |||
| 265 | 265 | .. method:: send_response_only(code, message=None) | |
| 266 | 266 | ||
| 267 | 267 | Sends the response header only, used for the purposes when ``100 | |
| 268 | - Continue`` response is sent by the server to the client. The headers not | ||
| 269 | - buffered and sent directly the output stream.If the *message* is not | ||
| 268 | + Continue`` response is sent by the server to the client. The headers are | ||
| 269 | + not buffered and sent directly the output stream. If the *message* is not | ||
| 270 | 270 | specified, the HTTP message corresponding the response *code* is sent. | |
| 271 | 271 | ||
| 272 | 272 | This method does not reject *message* containing CRLF sequences. | |
@@ -308,7 +308,7 @@ provides three different variants: | |||
| 308 | 308 | to create custom error logging mechanisms. The *format* argument is a | |
| 309 | 309 | standard printf-style format string, where the additional arguments to | |
| 310 | 310 | :meth:`log_message` are applied as inputs to the formatting. The client | |
| 311 | - ip address and current date and time are prefixed to every message logged. | ||
| 311 | + IP address and current date and time are prefixed to every message logged. | ||
| 312 | 312 | ||
| 313 | 313 | .. method:: version_string() | |
| 314 | 314 | ||
@@ -443,9 +443,8 @@ provides three different variants: | |||
| 443 | 443 | Add :func:`mimetypes.guess_file_type` as a fallback. | |
| 444 | 444 | ||
| 445 | 445 | ||
| 446 | - The :class:`SimpleHTTPRequestHandler` class can be used in the following | ||
| 447 | - manner in order to create a very basic webserver serving files relative to | ||
| 448 | - the current directory:: | ||
| 446 | + The :class:`SimpleHTTPRequestHandler` class can be used to create a very basic | ||
| 447 | + webserver serving files relative to the current directory as follows:: | ||
| 449 | 448 | ||
| 450 | 449 | import http.server | |
| 451 | 450 | import socketserver | |
@@ -610,13 +609,13 @@ Security considerations | |||
| 610 | 609 | .. index:: pair: http.server; security | |
| 611 | 610 | ||
| 612 | 611 | :class:`SimpleHTTPRequestHandler` will follow symbolic links when handling | |
| 613 | - requests, this makes it possible for files outside of the specified directory | ||
| 612 | + requests which makes it possible for files outside of the specified directory | ||
| 614 | 613 | to be served. | |
| 615 | 614 | ||
| 616 | 615 | Methods :meth:`BaseHTTPRequestHandler.send_header` and | |
| 617 | 616 | :meth:`BaseHTTPRequestHandler.send_response_only` assume sanitized input | |
| 618 | 617 | and do not perform input validation such as checking for the presence of CRLF | |
| 619 | - sequences. Untrusted input may result in HTTP Header injection attacks. | ||
| 618 | + sequences. Untrusted input may result in HTTP header injection attacks. | ||
| 620 | 619 | ||
| 621 | 620 | Earlier versions of Python did not scrub control characters from the | |
| 622 | 621 | log messages emitted to stderr from ``python -m http.server`` or the | |
| Back | FazBrowse Home | New Git URL |
0 commit comments