diff options
author | PMunch <peterme@peterme.net> | 2021-12-14 14:28:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 13:28:42 +0000 |
commit | 3e31f55aed4cd9fdcc289687fd0e31edfc0af805 (patch) | |
tree | 4ab889a6c981341daaf0089f754ad8bde4d0cbda /lib/pure | |
parent | c55930f2e644fe04526eb4878e7e106229812fe4 (diff) | |
download | Nim-3e31f55aed4cd9fdcc289687fd0e31edfc0af805.tar.gz |
Fix #19253 (#19254)
This fixes 19253 by marking the bodyStream as completed when no content was sent.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/httpclient.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index 33da6ef6c..67ba8cf2b 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -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.} = |