X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Fhttp.c;h=6ca8bd8f565803129ddef2d0b956f85f99a9367c;hb=e21851ef5461875e3929605afe79f23be86c2404;hp=ee427fbd884ab7527d85cbeb8e4c9dcd93643730;hpb=7d0d04af0ae9a019adf0ee16248b5e9c8ea21922;p=pazpar2-moved-to-github.git diff --git a/src/http.c b/src/http.c index ee427fb..6ca8bd8 100644 --- a/src/http.c +++ b/src/http.c @@ -62,21 +62,23 @@ typedef int socklen_t; #include #include -#include "util.h" -#include "eventl.h" #include "pazpar2.h" #include "http.h" -#include "http_command.h" #define MAX_HTTP_HEADER 4096 +#ifdef WIN32 +#define strncasecmp _strnicmp +#define strcasecmp _stricmp +#endif + static void proxy_io(IOCHAN i, int event); static struct http_channel *http_create(const char *addr, struct conf_server *server); static void http_destroy(IOCHAN i); -static struct http_buf *http_buf_freelist = 0; -static struct http_channel *http_channel_freelist = 0; +static struct http_buf *http_buf_freelist = 0; /* thread pr */ +static struct http_channel *http_channel_freelist = 0; /* thread pr */ struct http_channel_observer_s { void *data; @@ -87,8 +89,8 @@ struct http_channel_observer_s { }; -static const char *http_lookup_header(struct http_header *header, - const char *name) +const char *http_lookup_header(struct http_header *header, + const char *name) { for (; header; header = header->next) if (!strcasecmp(name, header->name)) @@ -268,7 +270,7 @@ void http_addheader(struct http_response *r, const char *name, const char *value r->headers = h; } -char *http_argbyname(struct http_request *r, char *name) +const char *http_argbyname(struct http_request *r, const char *name) { struct http_argument *p; if (!name) @@ -279,7 +281,7 @@ char *http_argbyname(struct http_request *r, char *name) return 0; } -char *http_headerbyname(struct http_header *h, char *name) +const char *http_headerbyname(struct http_header *h, const char *name) { for (; h; h = h->next) if (!strcmp(h->name, name))