summaryrefslogtreecommitdiff
path: root/Lib/test/test_xmlrpc.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30458: Disallow control chars in http URLs (GH-12755) (GH-13154) (GH-13315)Victor Stinner2019-05-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | Disallow control chars in http URLs in urllib2.urlopen. This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected. Disable https related urllib tests on a build without ssl (GH-13032) These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures. Use httplib.InvalidURL instead of ValueError as the new error case's exception. (GH-13044) Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz> (cherry picked from commit 7e200e0763f5b71c199aaf98bd5588f291585619) Notes on backport to Python 2.7: * test_urllib tests urllib.urlopen() which quotes the URL and so is not vulerable to HTTP Header Injection. * Add tests to test_urllib2 on urllib2.urlopen(). * Reject non-ASCII characters: range 0x80-0xff.
* [2.7] bpo-33759: Fix test.test_xmlrpc.ServerProxyTestCase. (GH-7362) (GH-7374)Serhiy Storchaka2018-06-031-7/+3
| | | | | | It depended on a global variable set by other tests.. (cherry picked from commit 7cfd8c6a1b53a7dbdea14b6f414f2629dcd130a2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Issue #26873: xmlrpclib now raises ResponseError on unsupported type tagsSerhiy Storchaka2016-05-041-0/+14
| | | | instead of silently return incorrect result.
* Issue #26147: xmlrpclib now works with unicode not encodable with usedSerhiy Storchaka2016-01-201-3/+24
| | | | non-UTF-8 encoding.
* Issue #9006: Added tests for XML RPC with non-UTF-8 encoding.Serhiy Storchaka2016-01-181-3/+53
|
* Issue #21847: Fixed xmlrpclib and tests on Unicode-disabled builds.Serhiy Storchaka2016-01-181-10/+9
|
* add a default limit for the amount of data xmlrpclib.gzip_decode will return ↵Benjamin Peterson2014-12-051-1/+18
| | | | (closes #16043)
* Issue #19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-101-5/+7
|
* Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServerCharles-François Natali2012-02-181-0/+6
|\ | | | | | | upon malformed POST request.
| * Fix deprecation warning in test_xmlrpc.Ezio Melotti2010-08-031-0/+1
| |
| * Merged revisions 71984 via svnmerge fromWalter Dörwald2009-04-261-20/+18
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71984 | walter.doerwald | 2009-04-26 22:51:44 +0200 (So, 26 Apr 2009) | 2 lines Use test.test_support.EnvironmentVarGuard where tests change environment vars. ........
| * Merged revisions ↵Georg Brandl2009-04-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70866-70868,70870-70871,70893,70896,70902,70905,70907,70912,70915,70927,70933,70940,70944,70954,70963,70998,71056 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70866 | georg.brandl | 2009-03-31 21:06:57 +0200 (Di, 31 Mär 2009) | 1 line #4882: document named group behavior a bit better. ........ r70867 | georg.brandl | 2009-03-31 21:10:35 +0200 (Di, 31 Mär 2009) | 1 line #1096310: document usage of sys.__std*__ a bit better. ........ r70868 | georg.brandl | 2009-03-31 21:12:17 +0200 (Di, 31 Mär 2009) | 1 line #5190: export make_option in __all__. ........ r70870 | georg.brandl | 2009-03-31 21:26:24 +0200 (Di, 31 Mär 2009) | 1 line #4411: document mro() and __mro__. (I hope I got it right.) ........ r70871 | georg.brandl | 2009-03-31 21:30:56 +0200 (Di, 31 Mär 2009) | 1 line #5618: fix typo. ........ r70893 | georg.brandl | 2009-03-31 22:56:32 +0200 (Di, 31 Mär 2009) | 1 line #1530012: move TQS section before raw strings. ........ r70896 | georg.brandl | 2009-03-31 23:15:33 +0200 (Di, 31 Mär 2009) | 1 line #5598: document DocFileSuite *args argument. ........ r70902 | georg.brandl | 2009-03-31 23:43:03 +0200 (Di, 31 Mär 2009) | 1 line #1675026: add a note about a strange Windows problem, and remove notes about AtheOS. ........ r70905 | georg.brandl | 2009-04-01 00:03:40 +0200 (Mi, 01 Apr 2009) | 1 line #5563: more documentation for bdist_msi. ........ r70907 | georg.brandl | 2009-04-01 00:18:19 +0200 (Mi, 01 Apr 2009) | 1 line #3427: document correct return type for urlopen().info(). ........ r70912 | georg.brandl | 2009-04-01 00:35:46 +0200 (Mi, 01 Apr 2009) | 1 line #5617: add a handy function to print a unicode string to gdbinit. ........ r70915 | georg.brandl | 2009-04-01 00:40:16 +0200 (Mi, 01 Apr 2009) | 1 line #5018: remove confusing paragraph. ........ r70927 | georg.brandl | 2009-04-01 01:01:27 +0200 (Mi, 01 Apr 2009) | 1 line Dont shout to users. ........ r70933 | georg.brandl | 2009-04-01 02:04:33 +0200 (Mi, 01 Apr 2009) | 2 lines Issue #5635: Fix running test_sys with tracing enabled. ........ r70940 | georg.brandl | 2009-04-01 06:21:14 +0200 (Mi, 01 Apr 2009) | 2 lines The SimpleXMLRPCServer's CGI handler now runs like a pony. ........ r70944 | georg.brandl | 2009-04-01 06:32:39 +0200 (Mi, 01 Apr 2009) | 1 line #5631: add upload to list of possible commands, which is presented in --help-commands. ........ r70954 | georg.brandl | 2009-04-01 17:23:43 +0200 (Mi, 01 Apr 2009) | 1 line Fix test_xmlrpc and make the CGI handler work with no CONTENT_LENGTH. ........ r70963 | georg.brandl | 2009-04-01 19:46:01 +0200 (Mi, 01 Apr 2009) | 1 line #5655: fix docstring oversight. ........ r70998 | georg.brandl | 2009-04-01 23:54:21 +0200 (Mi, 01 Apr 2009) | 1 line In Pdb, stop assigning values to __builtin__._ which interferes with the one commonly installed by gettext. ........ r71056 | georg.brandl | 2009-04-02 19:43:07 +0200 (Do, 02 Apr 2009) | 2 lines Actually the displayhook should print the repr. ........
| * Merged revisions ↵Georg Brandl2008-12-051-1/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67245,67277,67289,67295,67301-67303,67307,67330,67332,67336,67355,67359,67362,67364,67367-67368,67370 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67245 | benjamin.peterson | 2008-11-17 23:05:19 +0100 (Mon, 17 Nov 2008) | 1 line improve __hash__ docs ........ r67277 | skip.montanaro | 2008-11-19 04:35:41 +0100 (Wed, 19 Nov 2008) | 1 line patch from issue 1108 ........ r67289 | brett.cannon | 2008-11-19 21:29:39 +0100 (Wed, 19 Nov 2008) | 2 lines Ignore .pyc and .pyo files. ........ r67295 | benjamin.peterson | 2008-11-20 05:05:12 +0100 (Thu, 20 Nov 2008) | 1 line move useful sys.settrace information to the function's documentation from the debugger ........ r67301 | benjamin.peterson | 2008-11-20 22:25:31 +0100 (Thu, 20 Nov 2008) | 1 line fix indentation and a sphinx warning ........ r67302 | benjamin.peterson | 2008-11-20 22:44:23 +0100 (Thu, 20 Nov 2008) | 1 line oops! didn't mean to disable that test ........ r67303 | benjamin.peterson | 2008-11-20 23:06:22 +0100 (Thu, 20 Nov 2008) | 1 line backport r67300 ........ r67307 | amaury.forgeotdarc | 2008-11-21 00:34:31 +0100 (Fri, 21 Nov 2008) | 9 lines Fixed issue #4233. Changed semantic of _fileio.FileIO's close() method on file objects with closefd=False. The file descriptor is still kept open but the file object behaves like a closed file. The FileIO object also got a new readonly attribute closefd. Approved by Barry Backport of r67106 from the py3k branch ........ r67330 | georg.brandl | 2008-11-22 09:34:14 +0100 (Sat, 22 Nov 2008) | 2 lines #4364: fix attribute name on ctypes object. ........ r67332 | georg.brandl | 2008-11-22 09:45:33 +0100 (Sat, 22 Nov 2008) | 2 lines Fix typo. ........ r67336 | georg.brandl | 2008-11-22 11:08:50 +0100 (Sat, 22 Nov 2008) | 2 lines Fix error about "-*-" being mandatory in coding cookies. ........ r67355 | georg.brandl | 2008-11-23 20:17:25 +0100 (Sun, 23 Nov 2008) | 2 lines #4392: fix parameter name. ........ r67359 | georg.brandl | 2008-11-23 22:57:30 +0100 (Sun, 23 Nov 2008) | 2 lines #4399: fix typo. ........ r67362 | gregory.p.smith | 2008-11-24 01:41:43 +0100 (Mon, 24 Nov 2008) | 2 lines Document PY_SSIZE_T_CLEAN for PyArg_ParseTuple. ........ r67364 | benjamin.peterson | 2008-11-24 02:16:29 +0100 (Mon, 24 Nov 2008) | 2 lines replace reference to debugger-hooks ........ r67367 | georg.brandl | 2008-11-24 17:16:07 +0100 (Mon, 24 Nov 2008) | 2 lines Fix typo. ........ r67368 | georg.brandl | 2008-11-24 20:56:47 +0100 (Mon, 24 Nov 2008) | 2 lines #4404: make clear what "path" is. ........ r67370 | jeremy.hylton | 2008-11-24 23:00:29 +0100 (Mon, 24 Nov 2008) | 8 lines Add unittests that verify documented behavior of public methods in Transport class. These methods can be overridden. The tests verify that the overridden methods are called, and that changes to the connection have a visible effect on the request. ........
* | Remove duplication.Ezio Melotti2011-10-191-2/+2
| |
* | Issue #12931: xmlrpclib now encodes Unicode URI to ISO-8859-1, instead ofVictor Stinner2011-09-231-0/+3
| | | | | | | | failing with a UnicodeDecodeError.
* | Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-18/+18
| | | | | | | | | | | | | | | | | | | | 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. ........
* | Issue #7449, part 9: fix test_xmlrpclib for missing threading moduleVictor Stinner2010-04-271-3/+23
| | | | | | | | | | | | * 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
* | Issue 6292: for the moment at least, the test suite passes if runR. David Murray2010-02-231-0/+2
| | | | | | | | | | | | with -OO. Tests requiring docstrings are skipped. Patch by Brian Curtin, thanks to Matias Torchinsky for helping review and improve the patch.
* | use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-5/+5
| |
* | use assert[Not]In where appropriateEzio Melotti2010-01-231-4/+4
| |
* | Try to fix transient refleaks in test_xmlrpc.Antoine Pitrou2009-10-301-0/+1
| |
* | Don't invoke reload(sys) and use StringIO objects instead of real files to ↵Nick Coghlan2009-10-171-46/+34
| | | | | | | | capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs)
* | Issue 6654Kristján Valur Jónsson2009-08-271-1/+75
| | | | | | | | Allow the XML-RPC server to use the HTTP request path when dispatching. Added a MultiPathXMLRPCServer class that uses the feature, plus unit tests.
* | http://bugs.python.org/issue6499Kristján Valur Jónsson2009-07-191-1/+5
| | | | | | | | zlib/gzip may not be present for all builds. Make xmlrpclib gracefully not supporg gzip encoding in this case
* | http://bugs.python.org/issue6267Kristján Valur Jónsson2009-07-121-4/+41
| | | | | | | | Add more tests for the xlmrpc.ServerProxy
* | http://bugs.python.org/issue6460Kristján Valur Jónsson2009-07-111-2/+8
| | | | | | | | Need to be careful with thread switching when testing the xmlrpc server. The server thread may not have updated stats when the client thread tests them.
* | convert usage of fail* to assert*Benjamin Peterson2009-06-301-14/+14
| |
* | http://bugs.python.org/issue6267Kristján Valur Jónsson2009-06-281-14/+128
| | | | | | | | Cumulative patch to http and xmlrpc
* | Make test.test_support.EnvironmentVarGuard behave like a dictionary.Walter Dörwald2009-05-011-2/+2
| | | | | | | | | | All changes are mirrored to the underlying os.environ dict, but rolled back on exit from the with block.
* | Use test.test_support.EnvironmentVarGuard where tests change environment vars.Walter Dörwald2009-04-261-20/+18
| |
* | Fix for issue5040. Adding test for Content-LengthSenthil Kumaran2009-04-011-0/+28
| |
* | Fix test_xmlrpc and make the CGI handler work with no CONTENT_LENGTH.Georg Brandl2009-04-011-1/+5
| |
* | Re-enable all tests for windows platforms.Kristján Valur Jónsson2009-01-141-25/+24
| | | | | | | | Also, explicitly connect to the IPV4 address. On windows platforms supporting AF_INET6, the SocketProxy would connect using socket.create_connection('localhost', port) which would cycle through all address families and try to connect. It would try connecting using AF_INET6 first and this would cause a delay of up to a second.
* | Issue 4879: Allow buffering for HTTPResponseKristján Valur Jónsson2009-01-111-1/+1
| |
* | Add unittests that verify documented behavior of public methods in TransportJeremy Hylton2008-11-241-1/+86
|/ | | | | | | | class. These methods can be overridden. The tests verify that the overridden methods are called, and that changes to the connection have a visible effect on the request.
* Comment typoAndrew M. Kuchling2008-04-211-1/+1
|
* resolve issue 2014Skip Montanaro2008-04-181-0/+11
|
* Bug 1503: Get the test to pass on OSX. This should make the test moreNeal Norwitz2008-03-281-2/+10
| | | | | | | | | | | | reliable, but I'm not convinced it is the right solution. We need to determine if this causes the test to hang on any platforms or do other bad things. Even if it gets the test to pass reliably, it might be that we want to fix this in socket. The socket returned from accept() is different on different platforms (inheriting attributes or not) and we might want to ensure that the attributes (at least blocking) is the same across all platforms.
* Speed up the test by avoiding socket timeouts.Neal Norwitz2008-03-231-3/+5
|
* #1330538: Improve comparison of xmlrpclib.DateTime and datetime instances.Andrew M. Kuchling2008-02-231-47/+8
| | | | | | Remove automatic handling of datetime.date and datetime.time. This breaks backward compatibility, but python-dev discussion was strongly against this automatic conversion; see the bug for a link.
* socket.error doesn't have a headers attribute like ProtocolError.Neal Norwitz2008-01-271-10/+10
| | | | Handle that situation where we catch socket.errors.
* Try to handle socket.errors properly in is_unavailableNeal Norwitz2008-01-271-3/+7
|
* Catch socket errors that are often the cause of transient failures.Neal Norwitz2008-01-271-10/+10
| | | | | Many of these exceptions are due to resource unavailable, so the existing code should be able to handle many more spurious errors.
* The OS X buildbot had errors with the unavailable exceptions disabled. ↵Neal Norwitz2008-01-261-8/+2
| | | | Restore it.
* Use a condition variable (threading.Event) rather than sleeps and checking aNeal Norwitz2008-01-261-14/+19
| | | | | | | | | | | | | global to determine when the server is ready to be used. This slows the test down, but should make it correct. There was a race condition before where the server could have assigned a port, yet it wasn't ready to serve requests. If the client sent a request before the server was completely ready, it would get an exception. There was machinery to try to handle this condition. All of that should be unnecessary and removed if this change works. A NOTE was added as a comment about what needs to be fixed. The buildbots will tell us if there are more errors or if this test is now stable.
* Disabled test_xmlrpc:test_404. It's causing lots of false alarms.Christian Heimes2008-01-191-1/+2
| | | | I also disabled a test in test_ssl which requires network access to svn.python.org. This fixes a bug Skip has reported a while ago.
* Increase unit test coverage of SimpleXMLRPCServer.Georg Brandl2007-12-071-4/+132
| | | | Written for GHOP by Turkay Eren.
* Ignore test failures caused by 'resource temporarily unavailable'Facundo Batista2007-08-291-9/+15
| | | | | exceptions raised during FailingServerTestCase tests. [GSoC - Alan McIntyre]
* Ignore test failures caused by 'resource temporarily unavailable'Facundo Batista2007-08-271-12/+43
| | | | | | | exceptions raised in the test server thread, since SimpleXMLRPCServer does not gracefully handle them. Changed number of requests handled by tests server thread to one (was 2) because no tests require more than one request. [GSoC - Alan McIntyre]
* Catch ProtocolError exceptions and include the header information inFacundo Batista2007-08-211-25/+52
| | | | | test output (to make it easier to debug test failures caused by problems in the server). [GSoC - Alan McIntyre]