Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd9a0cc

Browse filesBrowse 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
Copy full SHA for cd9a0cc

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎python_files/python_server.py

Copy file name to clipboardExpand all lines: python_files/python_server.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.