From c52b7fba8c646930f3e78d3f1777c4d55a76469c Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Fri, 25 Nov 2022 16:48:33 +0300 Subject: [PATCH] [~] Refactor --- d1/f2.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/d1/f2.py b/d1/f2.py index c310793..1d69391 100644 --- a/d1/f2.py +++ b/d1/f2.py @@ -478,6 +478,18 @@ class Application: last_header = None while True: + if last_header == '\r\n' and len(response_headers) > 0 and \ + 'HTTP/1.1 100 Continue' in response_headers[0]: + self.op1( + json_data=dict( + last_header=last_header, + response_headers=response_headers, + action='restart_reading', + ) + ) + last_header = None + del response_headers[:] + if last_header == '\r\n' or not p.poll() is None: break