if ((strstr(buf, "Server: ") != NULL) &&
(strstr(buf, "lighttpd") != NULL)) {
st->server_type = LIGHTTPD;
if ((strstr(buf, "Server: ") != NULL) &&
(strstr(buf, "lighttpd") != NULL)) {
st->server_type = LIGHTTPD;
curl_easy_setopt (st->curl, CURLOPT_WRITEFUNCTION, apache_curl_callback);
curl_easy_setopt (st->curl, CURLOPT_WRITEDATA, st);
curl_easy_setopt (st->curl, CURLOPT_WRITEFUNCTION, apache_curl_callback);
curl_easy_setopt (st->curl, CURLOPT_WRITEDATA, st);
- st->server_type = -1; // not set as yet
- // if the user specified string doesn't match apache or lighttpd, then
- // ignore it. Headers will be parsed to find out the server type
+ /* not set as yet if the user specified string doesn't match apache or
+ * lighttpd, then ignore it. Headers will be parsed to find out the
+ * server type */
+ st->server_type = -1;
+
if (st->server_type == -1)
{
curl_easy_setopt (st->curl, CURLOPT_HEADERFUNCTION, apache_header_callback);
if (st->server_type == -1)
{
curl_easy_setopt (st->curl, CURLOPT_HEADERFUNCTION, apache_header_callback);