summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b046582)
raw | patch | inline | side by side (parent: b046582)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 1 May 2009 12:43:08 +0000 (14:43 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 1 May 2009 13:03:52 +0000 (15:03 +0200) |
src/apache.c | patch | blob | history |
diff --git a/src/apache.c b/src/apache.c
index 69633d6fb760f26457f9fc42e0aa2a0278c465ac..59fb19b475ff2df6e480f33e7f8ac09e350dfccb 100644 (file)
--- a/src/apache.c
+++ b/src/apache.c
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;