This fixes 19253 by marking the bodyStream as completed when no content
was sent.
This commit is contained in:
PMunch
2021-12-14 14:28:42 +01:00
committed by GitHub
parent c55930f2e6
commit 3e31f55aed

View File

@@ -869,6 +869,9 @@ proc parseResponse(client: HttpClient | AsyncHttpClient,
client.parseBodyFut.addCallback do():
if client.parseBodyFut.failed:
client.bodyStream.fail(client.parseBodyFut.error)
else:
when client is AsyncHttpClient:
result.bodyStream.complete()
proc newConnection(client: HttpClient | AsyncHttpClient,
url: Uri) {.multisync.} =