X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Fhttp.c;h=6ca8bd8f565803129ddef2d0b956f85f99a9367c;hb=572de728d257c3d2e6b11d0f60713c81b004c406;hp=87cb6442f90cd7f611d5805d71519b207a73bf59;hpb=15790e226ac62ed0813c89ba29fcd9b3d564fe19;p=pazpar2-moved-to-github.git diff --git a/src/http.c b/src/http.c index 87cb644..6ca8bd8 100644 --- a/src/http.c +++ b/src/http.c @@ -62,14 +62,16 @@ 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); @@ -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))