Skip to content

Commit cd9a0cc

Browse files
committed
Use stdin.buffer in get_headers()
We should use stdin.buffer.readline instead of stdin.readline because stdin.read* and stdin.buffer.read* should be used at the same time. (stdin.read* refers the internal buffer)
1 parent ae0ea9c commit cd9a0cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python_files/python_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def get_value(self) -> str:
163163
def get_headers():
164164
headers = {}
165165
while True:
166-
line = STDIN.readline().strip()
166+
line = STDIN.buffer.readline().decode().strip()
167167
if not line:
168168
break
169169
name, value = line.split(":", 1)

0 commit comments

Comments
 (0)