W3C home > Mailing lists > Public > public-bpwg-ct@w3.org > November 2008

ACTION-710: Test the effect of HEAD Requests on Various Servers

From: Francois Daoust <fd@w3.org>
Date: Thu, 13 Nov 2008 17:16:48 +0100
Message-ID: <491C52F0.7030402@w3.org>
To: public-bpwg-ct <public-bpwg-ct@w3.org>

A long time ago, I took an action to test HEAD requests to see how they 
were handled by servers.

What this is about
The hypothesis to check was that HEAD requests are usually treated as 
GET requests by Web Servers, except that the Web Server does not issue 
the HTTP response body. In particular, a HEAD request on a dynamic 
resource such as a JSP, PHP, ASP.NET page would execute the underlying 
code as though the request was a GET request (the code may handle the 
difference of course, but that's not the point here).

The conclusion is that the hypothesis is correct.
And thus no change required to the guidelines here.

Sending a HEAD request or a GET request doesn't have an impact on most 
of the code at the application level.
[ This is quite logical actually, since the server needs to return the 
length of the response, and thus needs to generate the response and 
execute the code ]
It still has an obvious impact on the logs of a content provider (since 
the HTTP method is usually logged)

Why we wanted to know
The reason why we wanted to investigate this was because of the 
following text in section 4.1.1 Applicable HTTP methods:
  "A transforming proxy may convert a HEAD request into a GET request"

We wanted to make sure this didn't have any real consequence for content 

Tests conducted
I ran a couple of tests with most common server pages systems (JSP, PHP, 
and ASP.NET), basically by returning a static page completed with a 
final line of code that sends a message to the debug console. Sending a 
HEAD request also triggers the final line, meaning the code is indeed 
executed as if a GET request had been received.

I initially planned to do a complete review of all the possible 
combinaisons (how fool one can be sometimes).
I don't see any reason to pursue that any further actually.

Received on Thursday, 13 November 2008 16:17:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:06:30 UTC