Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This fixes 19253 by marking the bodyStream as completed when no content
was sent.
  • Loading branch information
PMunch committed Mar 28, 2022
1 parent 0535e59 commit 20ce979
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/pure/httpclient.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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.} =
Expand Down

0 comments on commit 20ce979

Please sign in to comment.