[ic] HEAD method and mv_tmp_session

Jon Jensen jon at endpoint.com
Thu May 26 16:06:22 EDT 2005

On Thu, 26 May 2005, John Young wrote:

> Any thoughts here on whether or not the HTTP HEAD method
> should have a true mv_tmp_session?
> I'm kind of thinking it should since AFAIK HEAD is primarily
> used for link checking.  Also, if a browser does both GETs
> and HEADs when a user visits a page (I think Safari does this
> sometimes, unless I'm seeing scripts with phony User Agents),
> a bunch of non-visited pages can show up in the session history.
> I'm not sure if this would simply boil down to having:
>    $CGI::values{mv_tmp_session} = 1 if ("\U$CGI::request_method" eq 'HEAD');
> in Server.pm in the else{} just after the POST and PUT conditions.
> I'm quite concerned about what I could end up breaking, however.
> Ideally, HEAD wouldn't eat as many system resources as GET, but
> I'm not sure how easy it would be to have Interchange bail once
> it knows the HTTP status code.

Speeding up HEAD processing is a good idea, but setting mv_tmp_session 
would seem to be the wrong approach. HEAD can be used to see if a page has 
changed; what's on a page can be determined by what's in the session, so 
having a temporary session would make it impossible to handle properly.

I can't think of a good generic system for optimizing HEAD requests, but I 
suppose you could have an Autoload that would do something different when 
a HEAD vs. GET or POST request is made.


Jon Jensen
End Point Corporation

More information about the interchange-users mailing list