mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
This fixes 19253 by marking the bodyStream as completed when no content was sent.
This commit is contained in:
@@ -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.} =
|
||||
|
||||
Reference in New Issue
Block a user