HEAD Error

Bernie Aua (bernie@summum.org)
Mon, 4 Oct 1999 22:21:35 -0700


If I use the following to get the header of a web document,

  $request = new HTTP::Request 'HEAD' => $URL;
  $request->header('Accept' => 'text/html');
  $request->referer($referring_page);
  $response = $ua->request($request);

I occasionally get the following error:

RC: 500 (Internal Server Error)
Message: Unexpected EOF.

If I fetch the exact same document by replacing HEAD with GET,

  $request = new HTTP::Request 'GET' => $URL;
  $request->header('Accept' => 'text/html');
  $request->referer($referring_page);
  $response = $ua->request($request);

I get the page without any problems. Anyone know why HEAD is producing an
error?

Thanks,
Bernie