From the HTTP/1.1 spec:
The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.
(emphasis mine)
CircleCI doesn’t properly follow this; HEAD
requests return a Content-Length
of 0
:
$ curl -I https://4910-49970642-gh.circle-artifacts.com/0/home/ubuntu/yarn/artifacts/yarn_1.0.0-20170822.0315_all.deb
HTTP/1.1 200 OK
Cache-Control: max-age=31556926
Content-Length: 0
Content-Type: application/x-debian-package
Date: Sat, 02 Sep 2017 07:21:44 GMT
Server: nginx
Set-Cookie: ring-session=HXY28hYJ1dYdn7V7hwO8xtZoKRMbrW2WSlOjY2vixak%3D--GPX5JS2GYQ9GK4Dq81sKSHzg8sHdEeLUdAjYzZmlHgc%3D;Path=/;HttpOnly;Expires=Wed, 29 Aug 2018 19:31:18 +0000;Max-Age=31536000;Secure
Strict-Transport-Security: max-age=15724800
X-CircleCI-Identity: i-043e6a05b5517dc0a
Connection: keep-alive
Furthermore, GET
requests do not even return a Content-Length
at all!