Skip to content

Commit 48d5aaf

Browse files
committed
Ignore utf-8 decode error during logging
1 parent a84abab commit 48d5aaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proxy/http/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def _parse_first_request(self, data: memoryview) -> bool:
307307
except Exception as exc:
308308
logger.exception('Error parsing the request', exc_info=exc)
309309
raise HttpProtocolException(
310-
'Error when parsing request: %s' % data.tobytes().decode('utf-8'),
310+
'Error when parsing request: %s' % data.tobytes().decode('utf-8', errors='ignore'),
311311
)
312312
if not self.request.is_complete:
313313
return False

0 commit comments

Comments
 (0)