summaryrefslogtreecommitdiff
path: root/Lib/test/test_httpservers.py
AgeCommit message (Collapse)AuthorLines
2014-01-18fix handling of 100-continue status code (closes #18574)Benjamin Peterson-2/+4
2013-10-30merge 3.2 (#19435)Benjamin Peterson-0/+12
2013-10-30merge 3.1 (#19435)Benjamin Peterson-0/+12
2013-10-30use the collapsed path in the run_cgi method (closes #19435)Benjamin Peterson-0/+10
2013-09-13Fix http.server's request handling case on trailing '/'.Senthil Kumaran-0/+3
Patch contributed by Vajrasky Kok. Addresses Issue #17324
2013-02-04Do not raise self.skipTest().Serhiy Storchaka-2/+1
skipTest() already raises an exception.
2013-02-04Do not raise self.skipTest().Serhiy Storchaka-2/+1
skipTest() already raises an exception.
2012-09-30Speed up test_httpservers by avoiding a one-second cleanup wait after each ↵Antoine Pitrou-0/+1
test case.
2012-09-30Speed up test_httpservers by avoiding a one-second cleanup wait after each ↵Antoine Pitrou-0/+1
test case.
2012-08-05Fix CGI tests to take into account the platform's line ending (issue #13119)Antoine Pitrou-5/+7
2012-08-05Fix CGI tests to take into account the platform's line ending (issue #13119)Antoine Pitrou-5/+7
2012-04-12merge to default - Issue 10484 - Incorporate improvements to CGI module - ↵Senthil Kumaran-25/+28
Suggested by Glenn Linderman. Refactor code and tests
2012-04-123.2 - Issue 10484 - Incorporate improvements to CGI module - Suggested by ↵Senthil Kumaran-25/+28
Glenn Linderman. Refactor code and tests
2012-04-11merge - fix the incorrect changes made for PATH_INFO value - Issue10484Senthil Kumaran-1/+0
2012-04-113.2- fix the incorrect changes made for PATH_INFO value - Issue10484Senthil Kumaran-1/+0
2012-03-16closes issue10484 - Fix the http.server's cgi PATH_INFO handling problemSenthil Kumaran-0/+1
2012-03-16closes issue10484 - Fix the http.server's cgi PATH_INFO handling problemSenthil Kumaran-0/+1
2011-11-02Issue #13308: Fix test_httpservers failures when run as root.Charles-François Natali-2/+6
2011-11-02Issue #13308: Fix test_httpservers failures when run as root.Charles-François Natali-2/+6
2011-05-09Issue #3709: a flush_headers method to BaseHTTPRequestHandler which manages theSenthil Kumaran-17/+56
sending of headers to output stream and flushing the internal headers buffer. Patch contribution by Andrew Schaaf
2011-03-21Try to strengthen test_httpservers (issue #11617)Antoine Pitrou-4/+4
2011-03-16#11565: Merge with 3.1.Ezio Melotti-1/+1
2011-03-16#11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti-1/+1
2011-01-22To match the behaviour of HTTP server, the HTTP client library now also encodesArmin Ronacher-1/+7
headers with iso-8859-1 (latin1) encoding. It was already doing that for incoming headers which makes this behaviour now consistent in both incoming and outgoing direction.
2011-01-22Issue #10980: encode headers with latin1 instead of ASCII in the HTTP server.Armin Ronacher-0/+10
This makes the implementation of PEP 3333 compliant servers on top of BaseHTTPServer possible.
2010-12-28Fix #9333. The symlink function is always available now, raising OSErrorBrian Curtin-1/+1
when the user doesn't hold the symbolic link privilege rather than hiding it.
2010-12-18Merged revisions 87373,87381 via svnmerge fromAntoine Pitrou-0/+7
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87373 | senthil.kumaran | 2010-12-18 17:55:23 +0100 (sam., 18 déc. 2010) | 3 lines Fix Issue6791 - Limit the HTTP header readline with _MAXLENGTH. Patch by Antoine Pitrou ........ r87381 | antoine.pitrou | 2010-12-18 18:59:18 +0100 (sam., 18 déc. 2010) | 3 lines NEWS entry for r87373 ........
2010-12-18Fix Issue6791 - Limit the HTTP header readline with _MAXLENGTH. Patch by ↵Senthil Kumaran-0/+7
Antoine Pitrou
2010-12-16svnmerge fooled me. That test class already existed.Antoine Pitrou-80/+8
2010-12-16Forgot to enable this testAntoine Pitrou-0/+1
2010-12-16Merged revisions 87317 via svnmerge fromAntoine Pitrou-0/+101
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87317 | antoine.pitrou | 2010-12-16 17:48:36 +0100 (jeu., 16 déc. 2010) | 4 lines Issue #10714: Limit length of incoming request in http.server to 65536 bytes for security reasons. Initial patch by Ross Lagerwall. ........ (also backport some tests)
2010-12-16Issue #10714: Limit length of incoming request in http.server to 65536 bytesAntoine Pitrou-0/+6
for security reasons. Initial patch by Ross Lagerwall.
2010-12-02Fix #9333. Expose os.symlink on Windows only when usable.Brian Curtin-1/+1
In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege is an account privilege that is required to be held by the user. Not only must the privilege be enabled for the account, the activated privileges for the currently running application must be adjusted to enable the requested privilege. Rather than exposing an additional function to be called prior to the user's first os.symlink call, we handle the AdjustTokenPrivileges Windows API call internally and only expose os.symlink when the privilege escalation was successful. Due to the change of only exposing os.symlink when it's available, we can go back to the original test skipping methods of checking via `hasattr`.
2010-11-21Fix issue3709 - BaseHTTPRequestHandler will buffer the headers and write ↵Senthil Kumaran-0/+43
only on end_headers call.
2010-11-21Merged revisions 86596 via svnmerge fromEzio Melotti-23/+23
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
2010-10-31Fix ResourceWarning for an unclosed socket.Brian Curtin-0/+1
test_return_header_keep_alive - Added a cleanup call for the socket.
2010-10-29Move test_httpservers over to file context managers.Brett Cannon-12/+11
2010-10-17test_httpservers: Python CGI scripts have to be encoded to utf-8Victor Stinner-2/+2
And not the locale encoding. With this commit, the test finally pass on Windows with a non-ascii path :-)
2010-10-17test_httpservers: Fix skip test check, the python executable path have to beVictor Stinner-7/+10
encodable to utf-8, not to the file1 encoding.
2010-10-17test_httpservers: skip CGI tests if Python executable path is not encodableVictor Stinner-3/+14
2010-10-03Merged revisions 85202 via svnmerge fromSenthil Kumaran-0/+7
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85202 | senthil.kumaran | 2010-10-03 23:25:45 +0530 (Sun, 03 Oct 2010) | 4 lines Fix Issue9272 - Change CGIHTTPServer to give the child program a copy of os.environ ........
2010-10-03Fix Issue9272 - Change CGIHTTPServer to give the child program a copy of ↵Senthil Kumaran-0/+8
os.environ
2010-09-30Add BaseHTTPRequestHandler related tests.Senthil Kumaran-1/+76
2010-09-30Issue1491 - BaseHTTPServer incorrectly implements response code 100Senthil Kumaran-0/+98
2010-08-02Move test_SimpleHTTPServer into test_httpservers.Georg Brandl-5/+33
2010-07-08Implement #1578269. Patch by Jason R. Coombs.Brian Curtin-1/+1
Added Windows support for os.symlink when run on Windows 6.0 or greater, aka Vista. Previous Windows versions will raise NotImplementedError when trying to symlink. Includes numerous test updates and additions to test_os, including a symlink_support module because of the fact that privilege escalation is required in order to run the tests to ensure that the user is able to create symlinks. By default, accounts do not have the required privilege, so the escalation code will have to be exposed later (or documented on how to do so). I'll be following up with that work next. Note that the tests use ctypes, which was agreed on during the PyCon language summit.
2010-04-28Merged revisions 80552-80556,80564-80566,80568-80571 via svnmerge fromVictor Stinner-1/+1
svn+ssh://pythondev@svn.python.org/python/trunk ........ r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines Issue #7449, part 1: fix test_support.py for Python compiled without thread ........ r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line Issue #7449, part 2: regrtest.py -j option requires thread support ........ r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines Issue #7449 part 3, test_doctest: import trace module in test_coverage() Import trace module fail if the threading module is missing. test_coverage() is only used if test_doctest.py is used with the -c option. This commit allows to execute the test suite without thread support. Move "import trace" in test_coverage() and use test_support.import_module('trace'). ........ r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines Issue #7449, part 4: skip test_multiprocessing if thread support is disabled import threading after _multiprocessing to raise a more revelant error message: "No module named _multiprocessing". _multiprocessing is not compiled without thread support. ........ r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py * Split Test.test_open() in 2 functions: test_open() and test_thread_open() * Skip test_open() and test_thread_open() if we are unable to find the C library * Skip test_thread_open() if thread support is disabled * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError() ........ r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines Issue #7449, part 6: fix test_hashlib for missing threading module Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing(). ........ r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, part 7: simplify threading detection in test_capi * Skip TestPendingCalls if threading module is missing * Test if threading module is present or not, instead of test the presence of _testcapi._test_thread_state ........ r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing TestFifo can be executed without the threading module ........ r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, part 9: fix test_xmlrpclib for missing threading module * Skip testcases using threads if threading module is missing * Use "http://" instead of URL in ServerProxyTestCase if threading is missing because URL is not set in this case ........ r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines Partial revert of r80556 (Issue #7449, part 5, fix ctypes test) Rewrite r80556: the thread test have to be executed just after the test on libc_open() and so the test cannot be splitted in two functions (without duplicating code, and I don't want to duplicate code). ........ r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines Issue #7449, part 10: test_cmd imports trace module using test_support.import_module() Use test_support.import_module() instead of import to raise a SkipTest exception if the import fail. Import trace fails if the threading module is missing. See also part 3: test_doctest: import trace module in test_coverage(). ........ r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines Issue #7449, last part (11): fix many tests if thread support is disabled * Use try/except ImportError or test_support.import_module() to import thread and threading modules * Add @unittest.skipUnless(threading, ...) to testcases using threads ........
2010-04-25Merged revisions 80487,80489 via svnmerge fromAntoine Pitrou-6/+5
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80487 | antoine.pitrou | 2010-04-26 00:01:43 +0200 (lun., 26 avril 2010) | 12 lines Merged revisions 80484 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80484 | antoine.pitrou | 2010-04-25 23:40:32 +0200 (dim., 25 avril 2010) | 6 lines Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, where the method could block indefinitely if called just before the event loop started running. This also fixes the occasional freezes witnessed in test_httpservers. ........ ................ r80489 | antoine.pitrou | 2010-04-26 00:19:43 +0200 (lun., 26 avril 2010) | 9 lines Merged revisions 80480 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80480 | antoine.pitrou | 2010-04-25 23:15:50 +0200 (dim., 25 avril 2010) | 3 lines Replace a Lock with a better suited Event. ........ ................
2010-04-25Merged revisions 80480 via svnmerge fromAntoine Pitrou-6/+5
svn+ssh://pythondev@svn.python.org/python/trunk ........ r80480 | antoine.pitrou | 2010-04-25 23:15:50 +0200 (dim., 25 avril 2010) | 3 lines Replace a Lock with a better suited Event. ........
2010-03-28Note: only the relevant parts of r79474 are merged.Florent Xicluna-2/+12
Merged revisions 78793,78798-78799,78977,79095,79196,79474 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78793 | florent.xicluna | 2010-03-08 13:25:35 +0100 (lun, 08 mar 2010) | 2 lines Fix macpath to deal with bytes ................ r78798 | florent.xicluna | 2010-03-08 14:32:17 +0100 (lun, 08 mar 2010) | 18 lines Merged revisions 78777,78787,78790 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78777 | florent.xicluna | 2010-03-08 00:49:03 +0100 (lun, 08 mar 2010) | 4 lines Backport the Popen.poll() protection from subprocess to multiprocessing. See #1731717. It should fix transient failures on test_multiprocessing. ........ r78787 | florent.xicluna | 2010-03-08 08:21:16 +0100 (lun, 08 mar 2010) | 2 lines Don't fail on a debug() statement, if the worker PID is (still) None. ........ r78790 | florent.xicluna | 2010-03-08 12:01:39 +0100 (lun, 08 mar 2010) | 2 lines On finalize, don't try to join not started process. ........ ................ r78799 | florent.xicluna | 2010-03-08 15:44:41 +0100 (lun, 08 mar 2010) | 2 lines Fix ntpath abspath to deal with bytes. ................ r78977 | florent.xicluna | 2010-03-15 14:14:39 +0100 (lun, 15 mar 2010) | 2 lines Fix \xhh specs, #1889. (an oversight of r60193, r60210). ................ r79095 | florent.xicluna | 2010-03-19 15:40:31 +0100 (ven, 19 mar 2010) | 2 lines Rename test.test_support to test.support for 3.x. ................ r79196 | florent.xicluna | 2010-03-21 13:29:50 +0100 (dim, 21 mar 2010) | 9 lines Merged revisions 79195 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79195 | florent.xicluna | 2010-03-21 13:27:20 +0100 (dim, 21 mar 2010) | 2 lines Issue #8179: Fix macpath.realpath() on a non-existing path. ........ ................ r79474 | florent.xicluna | 2010-03-28 01:25:02 +0100 (dim, 28 mar 2010) | 33 lines Merged revisions 79297,79310,79382,79425-79427,79450 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79297 | florent.xicluna | 2010-03-22 18:18:18 +0100 (lun, 22 mar 2010) | 2 lines #7668: Fix test_httpservers failure when sys.executable contains non-ASCII bytes. ........ r79310 | florent.xicluna | 2010-03-22 23:52:11 +0100 (lun, 22 mar 2010) | 2 lines Issue #8205: Remove the "Modules" directory from sys.path when Python is running from the build directory (POSIX only). ........ r79382 | florent.xicluna | 2010-03-24 20:33:25 +0100 (mer, 24 mar 2010) | 2 lines Skip tests which depend on multiprocessing.sharedctypes, if _ctypes is not available. ........ r79425 | florent.xicluna | 2010-03-25 21:32:07 +0100 (jeu, 25 mar 2010) | 2 lines Syntax cleanup `== None` -> `is None` ........ r79426 | florent.xicluna | 2010-03-25 21:33:49 +0100 (jeu, 25 mar 2010) | 2 lines #8207: Fix test_pep277 on OS X ........ r79427 | florent.xicluna | 2010-03-25 21:39:10 +0100 (jeu, 25 mar 2010) | 2 lines Fix test_unittest and test_warnings when running "python -Werror -m test.regrtest" ........ r79450 | florent.xicluna | 2010-03-26 20:32:44 +0100 (ven, 26 mar 2010) | 2 lines Ensure that the failed or unexpected tests are sorted before printing. ........ ................