I am trying to perform a HEAD
request to a URL so I can get the Content-Length
header and then do Range requests.
However I found out AppEngine doesn't return the Content-Length
header when doing urlfetch.Head
. The documentation is explicit about it for responses, but not for requests.
Etag:["359670651"]
Expires:[Thu, 16 Oct 2014 20:41:52 GMT]
Server:[ECS (mdw/1275)]
X-Cache:[HIT]
X-Ec-Custom-Error:[1]
X-Google-Cache-Control:[remote-fetch]
Accept-Ranges:[bytes]
Cache-Control:[max-age=604800]
Content-Type:[text/html]
Date:[Thu, 09 Oct 2014 20:41:52 GMT]
Last-Modified:[Fri, 09 Aug 2013 23:54:35 GMT]
It works correctly when using net/http
of the Go library.
Last-Modified:[Fri, 09 Aug 2013 23:54:35 GMT]
Server:[ECS (iad/182A)]
Content-Length:[1270]
Accept-Ranges:[bytes]
Cache-Control:[max-age=604800]
Date:[Thu, 09 Oct 2014 20:38:01 GMT]
X-Cache:[HIT]
X-Ec-Custom-Error:[1]
Content-Type:[text/html]
Etag:["359670651"]
Expires:[Thu, 16 Oct 2014 20:38:01 GMT]
Is there any solution to this? A HEAD
request without the Content-Length
is kind of useless in my opinion.
Thanks.