File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ cdef class HttpParser:
152
152
return bool (cparser.http_should_keep_alive(self ._cparser))
153
153
154
154
def should_upgrade (self ):
155
- return bool (self ._cparser.upgrade)
155
+ cdef cparser.http_parser* parser = self ._cparser
156
+ return bool (parser.upgrade)
156
157
157
158
def feed_data (self , data ):
158
159
cdef:
Original file line number Diff line number Diff line change @@ -367,11 +367,12 @@ def on_message_complete(self):
367
367
protocol = Protocol ()
368
368
try :
369
369
protocol .parser .feed_data (UPGRADE_REQUEST1 )
370
- except httptools .HttpParserUpgrade as ex :
371
- offset = ex .args [0 ]
370
+ except httptools .HttpParserUpgrade :
371
+ # Raise as usual.
372
+ pass
372
373
else :
373
374
self .fail ('HttpParserUpgrade was not raised' )
374
-
375
+
375
376
def test_parser_request_error_in_on_header (self ):
376
377
class Error (Exception ):
377
378
pass
You can’t perform that action at this time.
0 commit comments