curl-library
HEAD not working when sent to IIS?
Date: Wed, 15 May 2002 02:31:03 +0100
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 seem 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.netReceived on 2002-05-15