X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fhttp.c;h=05198d653b03e432458a1f4ff8e2b6c5e4580632;hb=85294d71794f1849fc3575f1b2a1f1ab94753207;hp=87cb6442f90cd7f611d5805d71519b207a73bf59;hpb=15790e226ac62ed0813c89ba29fcd9b3d564fe19;p=pazpar2-moved-to-github.git diff --git a/src/http.c b/src/http.c index 87cb644..05198d6 100644 --- a/src/http.c +++ b/src/http.c @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2009 Index Data + Copyright (C) 2006-2010 Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -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))