| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
on Windows (GH-27161) (#27169)
GH-23638 introduced a new test for Accept: headers in CGI HTTP servers. This test serializes all of os.environ on the server side. For non-UTF8 locales this can fail for some Unicode characters found in environment variables. This change fixes the HTTP_ACCEPT test.
(cherry picked from commit 82b218f36ce6ef910bda5af227a9fd5be613c94f)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [Enum] reduce scope of new format behavior
Instead of treating all Enums the same for format(), only user mixed-in
enums will be affected. In other words, IntEnum and IntFlag will not be
changing the format() behavior, due to the requirement that they be
drop-in replacements of existing integer constants.
If a user creates their own integer-based enum, then the new behavior
will apply:
class Grades(int, Enum):
A = 5
B = 4
C = 3
D = 2
F = 0
Now: format(Grades.B) -> DeprecationWarning and '4'
3.12: -> no warning, and 'B'.
(cherry picked from commit f60b07ab6c943fce084772c3c7731ab3bbd213ff)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
301s (GH-25705)
* Set content-length for simple http server 301s
When http.server.SimpleHTTPRequestHandler sends a 301 (Moved
Permanently) due to a missing file, it does not set a Content-Length
of 0. Unfortunately, certain clients can be left waiting for the
connection to be closed in this circumstance, even though no body
will be sent. At time of writing, both curl and Firefox demonstrate
this behavior.
* Test Content-Length on simple http server redirect
When serving a redirect, the SimpleHTTPRequestHandler will now send
`Content-Length: 0`. Several tests for http.server already cover
various behaviors and checks including redirection. This change only
adds one check for the expected Content-Length on the simplest case
for a redirect.
* Add news entry for SimpleHTTPRequestHandler fix
* Clarify the specific kind of 301
Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
(cherry picked from commit fb427255614fc1f740e7785554c1da8ca39116c2)
Co-authored-by: Stephen Rosen <sirosen@globus.org>
|
| |
|
|
|
|
|
| |
* test_httplib
* test_httpservers
* test_logging
|
| |
|
|
|
| |
Automerge-Triggered-By: @tiran
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is_cgi() function of http.server library does not currently handle a
cgi script if one of the cgi_directories is located at the
sub-directory of given path. Since is_cgi() in CGIHTTPRequestHandler
class separates given path into (dir, rest) based on the first seen
'/', multi-level directories like /sub/dir/cgi-bin/hello.py is divided
into head=/sub, rest=dir/cgi-bin/hello.py then check whether '/sub'
exists in cgi_directories = [..., '/sub/dir/cgi-bin'].
This patch makes the is_cgi() keep expanding dir part to the next '/'
then checking if that expanded path exists in the cgi_directories.
Signed-off-by: Siwon Kang <kkangshawn@gmail.com>
https://bugs.python.org/issue38863
|
|
|
|
| |
(GH-11398)
|
|
|
|
|
|
|
| |
container (GH-14428)
sys._base_executable is now always defined on all platforms, and can be overridden through configuration.
Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
|
|
|
|
|
|
|
| |
address based on the bind parameter. (#11767)
In http.server script, rely on getaddrinfo to bind to preferred address based on the bind parameter.
As a result, now IPv6 is used as the default (including IPv4 on dual-stack systems). Enhanced tests.
|
| |
|
|
|
| |
The undecodable file name cannot be created on macOS APFS file systems.
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
| |
|
|
|
| |
Write the temporary file on disk and then get its modification time.
|
|
|
|
|
|
|
|
| |
http.server.SimpleHTTPRequestHandler and http.server module (#1776)
* bpo-28707: call the constructor of SimpleHTTPRequestHandler in the test with a mock object
* bpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and http.server module
|
|
|
|
| |
Return 304 response if file was not modified.
|
| |
|
| |
|
|
|
|
| |
Noticed by Xiang Zhang.
|
|\ |
|
| |
| |
| |
| | |
Patch by Susumu Koshiba.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Based on patch by Philipp Hagemeister. This fixes a regression caused by
revision f4377699fd47.
|
| |
| |
| |
| | |
Patch by Xiang Zhang.
|
|\ \
| |/ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|/
|
|
|
|
| |
in BaseHTTPRequestHandler
Initial patch by karlcow.
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
Initial patch from Xiang Zhang. Also fix out-of-date _url_collapse_path() doc
string.
|
| |
| |
| |
| | |
Patch from Xiang Zhang.
|
| |
| |
| |
| |
| |
| |
| | |
* Tests that index.html is served, rather than an automatic directory listing
* Tests that there is no extra data sent after the response
Patch by Martin Panter.
|
|/
|
|
| |
not as stringified enum. Patch by Demian Brecht.
|
|
|
|
|
|
| |
and add tests (closes #23410)
Patch by Martin Panter.
|
|
|
|
| |
Patch by Martin Panter.
|
|
|
|
| |
10.4 systems do not allow creation of files with such filenames.
|
|
|
|
| |
(closes #23112)
|
|
|
|
| |
revised by R. David Murray.
|
| |
|