summaryrefslogtreecommitdiffstats
path: root/Lib/http/server.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40094: CGIHTTPRequestHandler logs exit code (GH-19285)Victor Stinner2020-04-021-2/+3
| | | | | | | CGIHTTPRequestHandler of http.server now logs the CGI script exit code, rather than the CGI script exit status of os.waitpid(). For example, if the script is killed by signal 11, it now logs: "CGI script exit code -11."
* bpo-35292: Avoid calling mimetypes.init when http.server is imported (GH-17822)An Long2020-01-081-13/+10
|
* bpo-38907: Suppress any exception when attempting to set V6ONLY. (GH-17864)Jason R. Coombs2020-01-061-1/+5
| | | Fixes error attempting to bind to IPv4 address.
* bpo-38907: In http.server script, restore binding to IPv4 on Windows. (GH-17851)Jason R. Coombs2020-01-061-1/+13
|
* bpo-38863: Improve is_cgi() in http.server (GH-17312)Siwon Kang2019-11-221-2/+4
| | | | | | | | | | | | | | | | | | | 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
* bpo-35640: Allow passing PathLike arguments to SimpleHTTPRequestHandler ↵Géry Ogam2019-09-111-1/+1
| | | | (GH-11398)
* bpo-24209: In http.server script, rely on getaddrinfo to bind to preferred ↵Jason R. Coombs2019-02-071-10/+20
| | | | | | | 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.
* bpo-34711: Return HTTPStatus.NOT_FOUND if path.endswith('/') and not a ↵Michael Felt2018-12-261-0/+8
| | | | | | | | | | directory (GH-9687) AIX allows a trailing slash on local file system paths, which isn't what we want in http.server. Accordingly, check explicitly for this case in the server code, rather than relying on the OS raising an exception. Patch by Michael Felt.
* Adds IPv6 support when invoking http.server directly. (GH-10595)Lisa Roach2018-11-261-0/+3
|
* bpo-33663: Convert content length to string before putting to header (GH-7754)ValeriyaSinevich2018-06-181-1/+1
|
* bpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195)Géry Ogam2018-05-291-3/+3
|
* bpo-31639: Use threads in http.server module. (GH-5018)Julien Palard2018-03-231-2/+7
|
* bpo-31462: Remove trailing whitespaces. (#3564)Serhiy Storchaka2017-09-141-2/+2
|
* bpo-28707: Add the directory parameter to ↵Stéphane Wirtel2017-05-241-2/+13
| | | | | | | | 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
* bpo-30166: Import command-line parsing modules only when needed. (#1293)Serhiy Storchaka2017-05-041-1/+2
|
* bpo-29654 : Support If-Modified-Since HTTP header (browser cache) (#298)Pierre Quentel2017-04-021-4/+35
| | | | Return 304 response if file was not modified.
* Issue #28548: Parse HTTP request version even if too many words receivedMartin Panter2016-11-191-15/+18
|
* Issue #25738: Merge HTTP server from 3.5Martin Panter2016-06-081-13/+20
|\
| * Issue #25738: Don’t send message body for 205 Reset ContentMartin Panter2016-06-081-10/+20
| | | | | | | | Patch by Susumu Koshiba.
* | Issue #24902: Print server URL on http.server startupBerker Peksag2016-04-291-1/+2
| | | | | | | | Initial patch by Felix Kaiser.
* | Issue #26657: Merge http.server fix from 3.5Martin Panter2016-04-181-3/+3
|\ \ | |/
| * Issue #26657: Fix Windows directory traversal vulnerability with http.serverMartin Panter2016-04-181-3/+3
| | | | | | | | | | Based on patch by Philipp Hagemeister. This fixes a regression caused by revision f4377699fd47.
* | Issue #26404: Add context manager to socketserver, by Aviv PalivodaMartin Panter2016-04-131-10/+8
| |
* | Issue #26585: Eliminate _quote_html() and use html.escape(quote=False)Martin Panter2016-04-111-8/+8
| | | | | | | | Patch by Xiang Zhang.
* | Issue #26586: Simple enhancements to BaseHTTPRequestHandler by Xiang ZhangMartin Panter2016-04-031-15/+13
| |
* | Issue #26586: Merge excessive HTTP header handling from 3.5Martin Panter2016-04-031-0/+7
|\ \ | |/
| * Issue #26586: Handle excessive header fields in http.server, by Xiang ZhangMartin Panter2016-04-031-0/+7
| |
* | Issue #747320: Use email.utils.formatdate() to avoid code duplicationBerker Peksag2016-03-141-6/+2
|/ | | | | | in BaseHTTPRequestHandler Initial patch by karlcow.
* Merge typo fixes from 3.4 into 3.5Martin Panter2015-10-071-1/+1
|\
| * Various minor typos in documentation and commentsMartin Panter2015-10-071-1/+1
| |
* | Issues #25232, #24657: Merge two CGI server fixes from 3.4 into 3.5Martin Panter2015-10-031-9/+10
|\ \ | |/
| * Issue #24657: Prevent CGIRequestHandler from collapsing the URL queryMartin Panter2015-10-031-4/+9
| | | | | | | | | | Initial patch from Xiang Zhang. Also fix out-of-date _url_collapse_path() doc string.
| * Issue #25232: Fix CGIRequestHandler's splitting of URL queryMartin Panter2015-10-031-5/+1
| | | | | | | | Patch from Xiang Zhang.
* | Issue #24774: Fix docstring in http.server.test.Robert Collins2015-08-171-2/+1
|\ \ | |/ | | | | Patch from Chiu-Hsiang Hsu.
| * Issue #24774: Fix docstring in http.server.test.Robert Collins2015-08-171-2/+1
| | | | | | | | Patch from Chiu-Hsiang Hsu.
* | Issue #21793: BaseHTTPRequestHandler again logs response code as numeric,Serhiy Storchaka2015-03-071-1/+2
| | | | | | | | not as stringified enum. Patch by Demian Brecht.
* | merge 3.4 (#23410)Benjamin Peterson2015-02-181-10/+10
|\ \ | |/
| * document the requestline and close_connection attributes, use real booleans, ↵Benjamin Peterson2015-02-181-10/+10
| | | | | | | | | | | | and add tests (closes #23410) Patch by Martin Panter.
* | Issue #23418: Add missing entries to http.server.__all__.Berker Peksag2015-02-131-1/+4
|\ \ | |/ | | | | Patch by Martin Panter.
| * Issue #23418: Add missing entries to http.server.__all__.Berker Peksag2015-02-131-1/+4
| | | | | | | | Patch by Martin Panter.
* | merge 3.4 (#23112)Benjamin Peterson2014-12-261-2/+6
|\ \ | |/
| * fix behavior of trailing slash redirection when a query string is involved ↵Benjamin Peterson2014-12-261-2/+6
| | | | | | | | (closes #23112)
* | Issue #21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK,Serhiy Storchaka2014-12-231-99/+54
|/ | | | HTTPStatus.NOT_FOUND). Patch by Demian Brecht.
* Issue #22165: SimpleHTTPRequestHandler now supports undecodable file names.Serhiy Storchaka2014-08-171-4/+15
|
* Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,Ned Deily2014-07-131-5/+5
|\ | | | | | | broken by the fix for security issue #19435. Patch by Zach Byrne.
| * Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,Ned Deily2014-07-131-5/+5
| |\ | | | | | | | | | broken by the fix for security issue #19435. Patch by Zach Byrne.
| | * Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,Ned Deily2014-07-131-5/+5
| | | | | | | | | | | | broken by the fix for security issue #19435. Patch by Zach Byrne.
* | | merge 3.3 (#21766)Benjamin Peterson2014-06-151-1/+1
|\ \ \ | |/ /
| * | merge 3.2 (#21766)Benjamin Peterson2014-06-151-1/+1
| |\ \ | | |/
| | * url unquote the path before checking if it refers to a CGI script (closes ↵Benjamin Peterson2014-06-151-1/+1
| | | | | | | | | | | | #21766)