redirect hangs for 8-9 seconds if connection is not ended

pull/187/head
Anthony Leung 2024-07-05 10:40:33 +00:00
rodzic 2a398a3543
commit 5251e8fa5d
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -1666,11 +1666,11 @@ class AppResponse:
)
return self
def redirect(self, location, status_code=302):
self.write_status(status_code)
self.write_header("Location", location)
self.end_without_body(False)
return self
def redirect(self, location, status_code=302, end_connection=True):
self.write_status(status_code)
self.write_header("Location", location)
self.end_without_body(end_connection) # warning changing default to True, otherwise redirect hangs for 8-9 seconds
return self
def write_offset(self, offset):
lib.uws_res_override_write_offset(