aboutsummaryrefslogtreecommitdiff
path: root/examples/network/http_server_ssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/http_server_ssl.py')
-rw-r--r--examples/network/http_server_ssl.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/network/http_server_ssl.py b/examples/network/http_server_ssl.py
index 04e091344..9a69ca9d4 100644
--- a/examples/network/http_server_ssl.py
+++ b/examples/network/http_server_ssl.py
@@ -42,8 +42,13 @@ def main(use_stream=True):
# next request they issue will likely be more well-behaving and
# will succeed.
try:
- req = client_s.read(4096)
+ req = client_s.readline()
print(req)
+ while True:
+ h = client_s.readline()
+ if h == b"" or h == b"\r\n":
+ break
+ print(h)
if req:
client_s.write(CONTENT % counter)
except Exception as e: