LIGHTTPD
};
-
struct apache_s
{
int server_type;
int verify_peer;
int verify_host;
char *cacert;
- char *server; // user specific server type
+ char *server; /* user specific server type */
char *apache_buffer;
char apache_curl_error[CURL_ERROR_SIZE];
size_t apache_buffer_size;
if (len <= 0)
return len;
- // look for the Server header
+ /* look for the Server header */
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);
- 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 != NULL)
{
if (strcasecmp(st->server, "apache") == 0)
st->server_type = LIGHTTPD;
}
- // if not found register a header callback to determine the
- // server_type
+ /* if not found register a header callback to determine the server_type */
if (st->server_type == -1)
{
curl_easy_setopt (st->curl, CURLOPT_HEADERFUNCTION, apache_header_callback);
return (-1);
}
- // fallback - server_type to apache if not set at this time
+ /* fallback - server_type to apache if not set at this time */
if (st->server_type == -1)
st->server_type = APACHE;