fix broken CI (#16663)

This commit is contained in:
flywind
2021-01-10 10:19:40 -06:00
committed by GitHub
parent 7bde6aa37f
commit f82100ac93

View File

@@ -979,7 +979,7 @@ proc requestAux(client: HttpClient | AsyncHttpClient, url: Uri,
else:
if body.len != 0:
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"
when client is AsyncHttpClient: