curl-library
slow HEAD request
Date: Mon, 8 Nov 2010 20:33:41 +0100
Hello
I have another little problem. I am doing a head request with curl. Code:
#include <iostream>
#include <curl/curl.h>
int main (int argc, const char * argv[]) {
CURL* curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
curl_easy_setopt(curl, CURLOPT_URL, "http://www.zorba-xquery.com");
curl_easy_perform(curl);
return 0;
}
The code sends the correct request and the correct response is replied by the server. But somehow, curl seems to wait for the body. Of course, the body never arrives and curl waits till some timeout is reached.
Am I doing someting wrong? Do I need to set some additional options?
Regards
David
------------
David Graf
Software Architect
28msec Inc.
http://www.28msec.com/
http://twitter.com/28msec
------------
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-08