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
cffb9dee
Commit
cffb9dee
authored
Aug 09, 2003
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF patch #747364: BaseHTTPServer doesn't need StringIO intermediary
(Contributed by Andrew Dalke.)
parent
12c484da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
11 deletions
+1
-11
Lib/BaseHTTPServer.py
Lib/BaseHTTPServer.py
+1
-11
No files found.
Lib/BaseHTTPServer.py
View file @
cffb9dee
...
...
@@ -75,7 +75,6 @@ import time
import
socket
# For gethostbyaddr()
import
mimetools
import
SocketServer
import
cStringIO
# Default error message
DEFAULT_ERROR_MESSAGE
=
"""
\
...
...
@@ -276,17 +275,8 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
return
False
self
.
command
,
self
.
path
,
self
.
request_version
=
command
,
path
,
version
# Deal with pipelining
bytes
=
""
while
1
:
line
=
self
.
rfile
.
readline
()
bytes
=
bytes
+
line
if
line
==
'
\
r
\
n
'
or
line
==
'
\
n
'
or
line
==
''
:
break
# Examine the headers and look for a Connection directive
hfile
=
cStringIO
.
StringIO
(
bytes
)
self
.
headers
=
self
.
MessageClass
(
hfile
)
self
.
headers
=
self
.
MessageClass
(
self
.
rfile
,
0
)
conntype
=
self
.
headers
.
get
(
'Connection'
,
""
)
if
conntype
.
lower
()
==
'close'
:
...
...
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