From 3036ec9c4456f6a5edb0a5bbfbb3e3c79fba7d23 Mon Sep 17 00:00:00 2001 From: narimiran Date: Tue, 7 Apr 2020 16:32:07 +0200 Subject: [PATCH] fix #13894, httpclient hang on Http204 --- lib/pure/httpclient.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index e3e5a5c11..5c53c1a39 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -818,7 +818,7 @@ proc parseResponse(client: HttpClient | AsyncHttpClient, if not fullyRead: httpError("Connection was closed before full request has been made") - if getBody: + if getBody and result.code != Http204: when client is HttpClient: client.bodyStream = newStringStream() result.bodyStream = client.bodyStream