Charles-François Natali
e062466480
Issue #14001 : CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
...
upon malformed POST request.
2012-02-18 14:30:34 +01:00
Ezio Melotti
1e87da16ea
Remove duplication.
2011-10-19 10:39:35 +03:00
Victor Stinner
51b719814e
Issue #12931 : xmlrpclib now encodes Unicode URI to ISO-8859-1, instead of
...
failing with a UnicodeDecodeError.
2011-09-23 01:15:32 +02:00
Ezio Melotti
2623a37852
Merged revisions 86596 via svnmerge from
...
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-11-21 13:34:58 +00:00
Ezio Melotti
9d196959fc
Fix deprecation warning in test_xmlrpc.
2010-08-03 05:50:57 +00:00
Victor Stinner
a44b5a3326
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
2010-04-27 23:14:58 +00:00
R. David Murray
f28fd24c36
Issue 6292: for the moment at least, the test suite passes if run
...
with -OO. Tests requiring docstrings are skipped. Patch by
Brian Curtin, thanks to Matias Torchinsky for helping review and
improve the patch.
2010-02-23 00:24:49 +00:00
Ezio Melotti
b0f5adc3f4
use assert[Not]IsInstance where appropriate
2010-01-24 16:58:36 +00:00
Ezio Melotti
aa98058cc4
use assert[Not]In where appropriate
2010-01-23 23:04:36 +00:00
Antoine Pitrou
3c96858480
Try to fix transient refleaks in test_xmlrpc.
2009-10-30 17:56:00 +00:00
Nick Coghlan
8c1ffeb614
Don't invoke reload(sys) and use StringIO objects instead of real files to capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs)
2009-10-17 15:09:41 +00:00
Kristján Valur Jónsson
429677ec38
Issue 6654
...
Allow the XML-RPC server to use the HTTP request path when dispatching. Added a MultiPathXMLRPCServer class that uses the feature, plus unit tests.
2009-08-27 23:13:18 +00:00
Kristján Valur Jónsson
6d755900f6
http://bugs.python.org/issue6499
...
zlib/gzip may not be present for all builds. Make xmlrpclib gracefully not supporg gzip encoding in this case
2009-07-19 22:14:00 +00:00
Kristján Valur Jónsson
0369ba2a4a
http://bugs.python.org/issue6267
...
Add more tests for the xlmrpc.ServerProxy
2009-07-12 22:42:08 +00:00
Kristján Valur Jónsson
ef6007c1ae
http://bugs.python.org/issue6460
...
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.
2009-07-11 08:44:43 +00:00
Benjamin Peterson
5c8da86f3a
convert usage of fail* to assert*
2009-06-30 22:57:08 +00:00
Kristján Valur Jónsson
e007860b8b
http://bugs.python.org/issue6267
...
Cumulative patch to http and xmlrpc
2009-06-28 21:04:17 +00:00
Walter Dörwald
6733bed57e
Make test.test_support.EnvironmentVarGuard behave like a dictionary.
...
All changes are mirrored to the underlying os.environ dict, but rolled back
on exit from the with block.
2009-05-01 17:35:37 +00:00
Walter Dörwald
536120e34d
Merged revisions 71984 via svnmerge from
...
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.
........
2009-04-26 21:04:55 +00:00
Walter Dörwald
4b965f6ab1
Use test.test_support.EnvironmentVarGuard where tests change environment vars.
2009-04-26 20:51:44 +00:00
Georg Brandl
9b08e05e1e
Merged revisions 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.
........
2009-04-05 21:21:05 +00:00
Senthil Kumaran
20d114cad2
Fix for issue5040. Adding test for Content-Length
2009-04-01 20:26:33 +00:00
Georg Brandl
61fce3877c
Fix test_xmlrpc and make the CGI handler work with no CONTENT_LENGTH.
2009-04-01 15:23:43 +00:00
Kristján Valur Jónsson
018760e3dc
Re-enable all tests for windows platforms.
...
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.
2009-01-14 10:50:57 +00:00
Kristján Valur Jónsson
3c43fcba8b
Issue 4879: Allow buffering for HTTPResponse
2009-01-11 16:23:37 +00:00
Georg Brandl
d20946002a
Merged revisions 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.
........
2008-12-05 08:51:30 +00:00
Jeremy Hylton
8942011db1
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.
2008-11-24 22:00:29 +00:00
Andrew M. Kuchling
a5489d415e
Comment typo
2008-04-21 01:45:57 +00:00
Skip Montanaro
b131f0468f
resolve issue 2014
2008-04-18 20:35:46 +00:00
Neal Norwitz
70cea58c84
Bug 1503: Get the test to pass on OSX. This should make the test more
...
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.
2008-03-28 06:34:03 +00:00
Neal Norwitz
162d719113
Speed up the test by avoiding socket timeouts.
2008-03-23 04:08:30 +00:00
Andrew M. Kuchling
085f75a851
#1330538 : Improve comparison of xmlrpclib.DateTime and datetime instances.
...
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.
2008-02-23 16:23:05 +00:00
Neal Norwitz
cf25eb14af
socket.error doesn't have a headers attribute like ProtocolError.
...
Handle that situation where we catch socket.errors.
2008-01-27 20:03:13 +00:00
Neal Norwitz
ed444e52da
Try to handle socket.errors properly in is_unavailable
2008-01-27 18:19:04 +00:00
Neal Norwitz
183c5346fe
Catch socket errors that are often the cause of transient failures.
...
Many of these exceptions are due to resource unavailable, so the
existing code should be able to handle many more spurious errors.
2008-01-27 17:11:11 +00:00
Neal Norwitz
08b50eb3d3
The OS X buildbot had errors with the unavailable exceptions disabled. Restore it.
2008-01-26 08:26:00 +00:00
Neal Norwitz
653272f0cf
Use a condition variable (threading.Event) rather than sleeps and checking a
...
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.
2008-01-26 07:26:12 +00:00
Christian Heimes
6c29be54a5
Disabled test_xmlrpc:test_404. It's causing lots of false alarms.
...
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.
2008-01-19 16:39:27 +00:00
Georg Brandl
5d1b4d44aa
Increase unit test coverage of SimpleXMLRPCServer.
...
Written for GHOP by Turkay Eren.
2007-12-07 09:07:10 +00:00
Facundo Batista
492e5920bc
Ignore test failures caused by 'resource temporarily unavailable'
...
exceptions raised during FailingServerTestCase tests.
[GSoC - Alan McIntyre]
2007-08-29 10:28:28 +00:00
Facundo Batista
f91ad6a5da
Ignore test failures caused by 'resource temporarily unavailable'
...
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]
2007-08-27 01:15:34 +00:00
Facundo Batista
c65a5f1b14
Catch ProtocolError exceptions and include the header information in
...
test output (to make it easier to debug test failures caused by
problems in the server). [GSoC - Alan McIntyre]
2007-08-21 00:16:21 +00:00
Facundo Batista
7f686fce40
Added a flag (_send_traceback_header) to the SimpleXMLRPCServer class
...
that allows sending back exception/stack trace information about
internal server errors (this flag defaults to False to avoid sending
such information unless explicitly enabled). Added tests to verify
behavior of this new feature (these tests are skipped on win32 because
of problems with WSAEWOULDBLOCK). Renamed HTTPTestCase to
SimpleServerTestCase. [GSoC - Alan McIntyre]
2007-08-17 19:16:44 +00:00
Facundo Batista
a53872b09a
Added tests for simple function calls and introspection that are run
...
against a SimpleXMLRPCServer in a separate thread. Because of
problems with WSAEWOULDBLOCK (error 10035) being raised by the server
on Windows, these new tests are skipped on win32. [GSoC - Alan McIntyre]
2007-08-14 13:35:00 +00:00
Facundo Batista
5a3b524e8e
Added tests for basic behavior of DateTime, Binary, and Fault classes
...
and the escape function. Check that marshalling recursive sequences &
dicts raises TypeError. Check that marshalling out-of-range ints
raises OverflowError [Alan McIntyre - GSoC]
2007-07-13 10:43:44 +00:00
Martin v. Löwis
07529354db
Patch #1070046 : Marshal new-style objects like InstanceType
...
in xmlrpclib.
2006-11-19 18:51:54 +00:00
Tim Peters
536cf99536
Whitespace normalization.
2005-12-25 23:18:31 +00:00
Andrew M. Kuchling
bdb3901001
[Bug #1164912 ] Ensure Datetime wrapper class .value attribute is an 8-bit string, not a Unicode string
2005-12-04 19:11:17 +00:00
Skip Montanaro
174dd2219d
Add better datetime support to xmlrpclib module. Closes patch #1120353 .
2005-05-14 20:54:16 +00:00
Tim Peters
f754f5fd68
test_default_encoding_issues(): Fully restore sys.setdefaultencoding.
...
test_site often failed under "regrtest.py -r", because this xmlrpc test
left sys with a setdefaultencoding attribute, but loading site.py removes
that attribute and test_site.py verifies the attribute is gone. Changed
this test to get rid of sys.setdefaultencoding if it didn't exist when
this test started.
Don't know whether this is a bugfix (backport) candidate.
2005-04-08 18:00:59 +00:00