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:
152152 return bool (cparser.http_should_keep_alive(self ._cparser))
153153
154154 def should_upgrade (self ):
155- return bool (self ._cparser.upgrade)
155+ cdef cparser.http_parser* parser = self ._cparser
156+ return bool (parser.upgrade)
156157
157158 def feed_data (self , data ):
158159 cdef:
Original file line number Diff line number Diff line change @@ -367,11 +367,12 @@ def on_message_complete(self):
367367 protocol = Protocol ()
368368 try :
369369 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
372373 else :
373374 self .fail ('HttpParserUpgrade was not raised' )
374-
375+
375376 def test_parser_request_error_in_on_header (self ):
376377 class Error (Exception ):
377378 pass
You can’t perform that action at this time.
0 commit comments