Skip to content

Commit

Permalink
Fix decoding of streaming response, which has colon in headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nurlat Bekdullayev committed Jan 14, 2025
1 parent 3f2bbcb commit ec365ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cashews/contrib/_starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async def encode_streaming_response(
async def decode_streaming_response(value: bytes, backend: Backend, key: str, **kwargs) -> StreamingResponse:
if not await backend.get(f"{key}:done"):
raise DecodeError()
status_code, headers = value.split(b":")
status_code, headers = value.split(b":", maxsplit=1)
raw_headers = []
for header in headers.split(b";"):
if not header:
Expand Down

0 comments on commit ec365ef

Please sign in to comment.