PATCH apache.c: support IBM HTTP Server.
authorManuel Luis SanmartĂ­n Rozada <manuel.luis@gmail.com>
Wed, 8 Sep 2010 09:01:23 +0000 (11:01 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Sat, 11 Sep 2010 09:35:30 +0000 (11:35 +0200)
IBM HTTP Server is a version of apache 2 that comes with Websphere.
IBM change the server name header to:

Server: IBM_HTTP_Server

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/apache.c

index 3d6d957..80c66bf 100644 (file)
@@ -144,6 +144,8 @@ static size_t apache_header_callback (void *buf, size_t size, size_t nmemb,
                st->server_type = APACHE;
        else if (strstr (buf, "lighttpd") != NULL)
                st->server_type = LIGHTTPD;
+       else if (strstr (buf, "IBM_HTTP_Server") != NULL)
+               st->server_type = APACHE;
        else
        {
                const char *hdr = buf;
@@ -420,6 +422,8 @@ static int init_host (apache_t *st) /* {{{ */
                        st->server_type = APACHE;
                else if (strcasecmp(st->server, "lighttpd") == 0)
                        st->server_type = LIGHTTPD;
+               else if (strcasecmp(st->server, "ibm_http_server") == 0)
+                       st->server_type = APACHE;
                else
                        WARNING ("apache plugin: Unknown `Server' setting: %s",
                                        st->server);