[erlang-questions] Re: [erlang-questions 29] Re: fun with the new erlang.org!
Raimo Niskanen
raimo+erlang-questions@REDACTED
Fri Apr 1 16:46:15 CEST 2011
On Thu, Mar 31, 2011 at 10:15:29AM -0400, Steve Vinoski wrote:
:
> Also a bit unusual is the website's failure to respond to HEAD
> requests, as this verbose output from curl shows:
>
> $ curl -Iv http://www.erlang.org/
> * About to connect() to www.erlang.org port 80 (#0)
> * Trying 192.121.151.107... connected
> * Connected to www.erlang.org (192.121.151.107) port 80 (#0)
> > HEAD / HTTP/1.1
> > User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
> > Host: www.erlang.org
> > Accept: */*
> >
> * Empty reply from server
> * Connection #0 to host www.erlang.org left intact
> curl: (52) Empty reply from server
> * Closing connection #0
>
> A website technically doesn't need to respond to HEAD requests but for
> purposes of cache coherency it's common for caches to use both
> conditional GETs (which is why supporting ETag and cache control
> headers is important) and HEAD requests for checking for updates on
> origin servers.
>
> --steve
According to the Inets documentation mod_head should be after mod_get,
but that did not work. Now I have mod_head mod_responsecontrol mod_get.
That works for the static content. But the dynamic content served
by ErlangWeb before passing it to Inets does not support HEAD,
as it seems.
Try curl on http://www.erlang.org/images/banner.jpg now.
I will have to look into If-Modified-Since and HEAD for dynamic
content sometime later...
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list