Skip to content

Commit 026615f

Browse files
fix: normalize empty reason phrase to None in asyncio transport (#50)
PR: #50
1 parent 86b742d commit 026615f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/dexpace-sdk-http-stdlib/src/dexpace/sdk/http/stdlib/asyncio_http_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ async def _read(
232232
raise ServiceResponseError(f"Malformed status line: {status_line!r}")
233233
protocol = _PROTOCOL_BY_VERSION.get(parts[0], Protocol.HTTP_1_1)
234234
status = _parse_status(parts[1])
235-
reason = parts[2] if len(parts) > 2 else None
235+
reason = (parts[2] or None) if len(parts) > 2 else None
236236
headers = await self._read_headers(reader)
237237
body_bytes = await self._read_body(reader, headers)
238238
return AsyncResponse(

0 commit comments

Comments
 (0)