fix #13894, httpclient hang on Http204

This commit is contained in:
narimiran 2020-04-07 16:32:07 +02:00 • committed by Dominik Picheta
commit 3036ec9c44

View file

@ -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