Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
42622e3c
Commit
42622e3c
authored
Sep 23, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12931: xmlrpclib now encodes Unicode URI to ISO-8859-1, instead of
failing with a UnicodeDecodeError.
parent
b9e17443
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
Lib/test/test_xmlrpc.py
Lib/test/test_xmlrpc.py
+3
-0
Lib/xmlrpclib.py
Lib/xmlrpclib.py
+3
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_xmlrpc.py
View file @
42622e3c
...
...
@@ -472,6 +472,9 @@ class SimpleServerTestCase(BaseServerTestCase):
# protocol error; provide additional information in test output
self
.
fail
(
"%s
\
n
%s"
%
(
e
,
getattr
(
e
,
"headers"
,
""
)))
def
test_unicode_host
(
self
):
server
=
xmlrpclib
.
ServerProxy
(
u"http://%s:%d/RPC2"
%
(
ADDR
,
PORT
))
self
.
assertEqual
(
server
.
add
(
"a"
,
u"
\
xe9
"
),
u"a
\
xe9
"
)
# [ch] The test 404 is causing lots of false alarms.
def
XXXtest_404
(
self
):
...
...
Lib/xmlrpclib.py
View file @
42622e3c
...
...
@@ -1539,6 +1539,9 @@ class ServerProxy:
allow_none
=
0
,
use_datetime
=
0
):
# establish a "logical" server connection
if
isinstance
(
uri
,
unicode
):
uri
=
uri
.
encode
(
'ISO-8859-1'
)
# get the url
import
urllib
type
,
uri
=
urllib
.
splittype
(
uri
)
...
...
Misc/NEWS
View file @
42622e3c
...
...
@@ -47,6 +47,9 @@ Core and Builtins
Library
-------
- Issue #12931: xmlrpclib now encodes Unicode URI to ISO-8859-1, instead of
failing with a UnicodeDecodeError.
- Issue #8933: distutils'
PKG
-
INFO
files
will
now
correctly
report
Metadata
-
Version
:
1.1
instead
of
1.0
if
a
Classifier
or
Download
-
URL
field
is
present
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment