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
0a1af4ae
Commit
0a1af4ae
authored
Sep 15, 2004
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove tabs.
parent
ca0d2cb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Lib/httplib.py
Lib/httplib.py
+2
-2
Lib/test/test_httplib.py
Lib/test/test_httplib.py
+4
-4
No files found.
Lib/httplib.py
View file @
0a1af4ae
...
...
@@ -534,8 +534,8 @@ class HTTPConnection:
host
=
host
[:
i
]
else
:
port
=
self
.
default_port
if
host
[
0
]
==
'['
and
host
[
-
1
]
==
']'
:
host
=
host
[
1
:
-
1
]
if
host
[
0
]
==
'['
and
host
[
-
1
]
==
']'
:
host
=
host
[
1
:
-
1
]
self
.
host
=
host
self
.
port
=
port
...
...
Lib/test/test_httplib.py
View file @
0a1af4ae
...
...
@@ -121,14 +121,14 @@ def _test():
for
hp
,
h
,
p
in
((
"[fe80::207:e9ff:fe9b]:8000"
,
"fe80::207:e9ff:fe9b"
,
8000
),
(
"www.python.org:80"
,
"www.python.org"
,
80
),
(
"www.python.org"
,
"www.python.org"
,
80
),
(
"[fe80::207:e9ff:fe9b]"
,
"fe80::207:e9ff:fe9b"
,
80
)):
(
"[fe80::207:e9ff:fe9b]"
,
"fe80::207:e9ff:fe9b"
,
80
)):
try
:
http
=
httplib
.
HTTP
(
hp
)
except
httplib
.
InvalidURL
:
print
"InvalidURL raised erroneously"
c
=
http
.
_conn
if
h
!=
c
.
host
:
raise
AssertionError
,
(
"Host incorrectly parsed"
,
h
,
c
.
host
)
if
p
!=
c
.
port
:
raise
AssertionError
,
(
"Port incorrectly parsed"
,
p
,
c
.
host
)
c
=
http
.
_conn
if
h
!=
c
.
host
:
raise
AssertionError
,
(
"Host incorrectly parsed"
,
h
,
c
.
host
)
if
p
!=
c
.
port
:
raise
AssertionError
,
(
"Port incorrectly parsed"
,
p
,
c
.
host
)
# test response with multiple message headers with the same field name.
text
=
(
'HTTP/1.1 200 OK
\
r
\
n
'
...
...
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