Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
shrapnel
Commits
d466ebdb
Commit
d466ebdb
authored
Sep 13, 2012
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
connection.run(): send error reply *after* log line so connection problems don't interfere
http_request.__repr__(): a more useful repr
parent
936dd937
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
coro/http/server.py
coro/http/server.py
+5
-1
No files found.
coro/http/server.py
View file @
d466ebdb
...
...
@@ -91,10 +91,11 @@ class connection:
except
HTTP_Upgrade
:
upgrade
=
True
break
# XXX use Exception here, avoid catch/raise of coro.TimeoutError/Interrupted?
except
:
tb
=
coro
.
compact_traceback
()
request
.
error
(
500
,
tb
)
self
.
server
.
log
(
'error: %r request=%r tb=%r'
%
(
self
.
peer
,
request
,
tb
))
request
.
error
(
500
,
tb
)
except
(
OSError
,
coro
.
TimeoutError
,
coro
.
ClosedError
):
pass
finally
:
...
...
@@ -160,6 +161,9 @@ class http_request:
if self.has_body():
self.file = http_file (headers, client.stream)
def __repr__ (self):
return '
<
http
request
from
%
r
:
%
r
>
' % (self.peer, self.request,)
def wait_until_read (self):
"wait until this entire request body has been read"
if self.file:
...
...
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