Skip to content

Commit 4b61d74

Browse files
committed
Fix: Missing chunk length in ending message due to .lstrip()
1 parent c222d09 commit 4b61d74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_httpserver/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def send_chunk(self, chunk: str = "") -> None:
187187
188188
:param str chunk: String data to be sent.
189189
"""
190-
hex_length = hex(len(chunk)).lstrip("0x").rstrip("L")
190+
hex_length = hex(len(chunk))[2:] # removing 0x
191191

192192
self._send_bytes(
193193
self.request.connection, f"{hex_length}\r\n{chunk}\r\n".encode("utf-8")

0 commit comments

Comments
 (0)