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
236156f5
Commit
236156f5
authored
Dec 15, 2008
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use True/False for ints instead of 1/0. That's so Python 2.0.
parent
84f71d0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Lib/http/client.py
Lib/http/client.py
+5
-5
No files found.
Lib/http/client.py
View file @
236156f5
...
@@ -359,8 +359,8 @@ class HTTPResponse:
...
@@ -359,8 +359,8 @@ class HTTPResponse:
if
self
.
version
==
9
:
if
self
.
version
==
9
:
self
.
length
=
None
self
.
length
=
None
self
.
chunked
=
0
self
.
chunked
=
False
self
.
will_close
=
1
self
.
will_close
=
True
self
.
msg
=
email
.
message_from_string
(
''
)
self
.
msg
=
email
.
message_from_string
(
''
)
return
return
...
@@ -373,10 +373,10 @@ class HTTPResponse:
...
@@ -373,10 +373,10 @@ class HTTPResponse:
# are we using the chunked-style of transfer encoding?
# are we using the chunked-style of transfer encoding?
tr_enc
=
self
.
msg
.
get
(
"transfer-encoding"
)
tr_enc
=
self
.
msg
.
get
(
"transfer-encoding"
)
if
tr_enc
and
tr_enc
.
lower
()
==
"chunked"
:
if
tr_enc
and
tr_enc
.
lower
()
==
"chunked"
:
self
.
chunked
=
1
self
.
chunked
=
True
self
.
chunk_left
=
None
self
.
chunk_left
=
None
else
:
else
:
self
.
chunked
=
0
self
.
chunked
=
False
# will the connection close at the end of the response?
# will the connection close at the end of the response?
self
.
will_close
=
self
.
_check_close
()
self
.
will_close
=
self
.
_check_close
()
...
@@ -411,7 +411,7 @@ class HTTPResponse:
...
@@ -411,7 +411,7 @@ class HTTPResponse:
if
(
not
self
.
will_close
and
if
(
not
self
.
will_close
and
not
self
.
chunked
and
not
self
.
chunked
and
self
.
length
is
None
):
self
.
length
is
None
):
self
.
will_close
=
1
self
.
will_close
=
True
def
_check_close
(
self
):
def
_check_close
(
self
):
conn
=
self
.
msg
.
get
(
"connection"
)
conn
=
self
.
msg
.
get
(
"connection"
)
...
...
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