fix broken CI (#16663)

This commit is contained in:
flywind 2021-01-10 10:19:40 -06:00 • committed by GitHub
commit f82100ac93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -979,7 +979,7 @@ proc requestAux(client: HttpClient | AsyncHttpClient, url: Uri,
else: else:
if body.len != 0: if body.len != 0:
client.headers["Content-Length"] = $body.len client.headers["Content-Length"] = $body.len
elif httpMethod notin ["GET", "HEAD"] and not client.headers.hasKey("Content-Length"): elif httpMethod notin [HttpGet, HttpHead] and not client.headers.hasKey("Content-Length"):
client.headers["Content-Length"] = "0" client.headers["Content-Length"] = "0"
when client is AsyncHttpClient: when client is AsyncHttpClient: