curl-library
Re: HEAD not working when sent to IIS?
Date: Tue, 14 May 2002 22:56:12 -0400
The default behaviour of these optional requests(HEAD,PUT...) may vary
with the
web server.In most of the cases they are disabled
In NES(Netscape Enterprise Server) i know of a bug in some versions
where if you try to
use HEAD against the default page it doesnt work and returns error.If
you try a HEAD
with the page specified it works
HEAD / HTTP/1.1 - doesnt work
HEAD /index.htm HTTP/1.1 works
try specifying the page and see if it helps
Regards
Bharath
Russ Freeman wrote:
>Hi,
>
>I've just picked up libcurl and started using it using Win32. Congrats to
>the authors of libcurl. It's simple to use, a clean is odd interface, and
>apparently quite effective. Well done and thanks.
>
>However, I've run into a problem where HEAD doesn't to be working for
>IIS servers. Works fine on other servers that I've tested...such as
>yahoo.com.
>
>The url I'm using is a local machine URL: http://russ/
>
>The head request being sent looks like this:
>HEAD / HTTP/1.1
>Host: russ
>Pragma: no-cache
>Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
>
>GET for the same URL works just fine but HEAD returns:
>HTTP/1.1 403 Access Forbidden
>Server: Microsoft-IIS/5.0
>Date: Wed, 15 May 2002 01:03:18 GMT
>Connection: close
>Content-Length: 4126
>Content-Type: text/html
>
>
>I've tried it with a couple of known IIS servers out in the real world and
>it fails just the same.
>
>The code I used was a modified getinmemory.c. I added the lines below:
> curl_easy_setopt( curl_handle, CURLOPT_HEADER, 1 );
> curl_easy_setopt( curl_handle, CURLOPT_NOBODY, 1 );
>Just before the URL. I also modified the WriteMemoryCallback to write out
>the resulting data.
>
>
>What am I doing wrong? Any clues might help...
>
>
>--
>russ.
>http://www.gipsysoft.com/qhtm/ - FREE HTML display in a small and light DLL
>http://www.gipsysoft.com/ZoomPlus/ - Programmers Zoom Utility on Steroids
>
>
>_______________________________________________________________
>
>Have big pipes? SourceForge.net is looking for download mirrors. We supply
>the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.net
>
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.net
Received on 2002-05-15