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
commit 3e31f55aed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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.} =