diff --git a/ChangeLog b/ChangeLog index cc95381..d3ee9dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ +2012-02-10 05:52:50 +0100 Georg Hopp + + * fix bug that arose in rewrite of header get and results in an ugly memory leak, as well as no headers would be found any more (HEAD, master) + +2012-02-10 00:27:51 +0100 Georg Hopp + + * fix memory leak created while changing things + 2012-02-09 22:39:08 +0100 Georg Hopp - * updated docs (HEAD, master) + * updated docs 2012-02-09 22:34:32 +0100 Georg Hopp diff --git a/src/http/header/get.c b/src/http/header/get.c index 65e9748..0e145d3 100644 --- a/src/http/header/get.c +++ b/src/http/header/get.c @@ -35,7 +35,7 @@ httpHeaderGet(const HttpHeader header[], int nheader, const char * name) found = bsearch(&hash, header, nheader, sizeof(HttpHeader), comp); - return (NULL != *found)? (*found)->value : NULL; + return (NULL != found)? (*found)->value : NULL; } // vim: set ts=4 sw=4: diff --git a/src/http/header/sort.c b/src/http/header/sort.c index 4c1ded9..95d58e0 100644 --- a/src/http/header/sort.c +++ b/src/http/header/sort.c @@ -1,3 +1,5 @@ +#include + #include "http/header.h" static @@ -13,7 +15,7 @@ comp (const void * _a, const void * _b) void httpHeaderSort(const HttpHeader header[], int nheader) { - qsort(header, nheader, sizeof(HttpHeader), comp); + qsort((void*)header, nheader, sizeof(HttpHeader), comp); } // vim: set ts=4 sw=4: diff --git a/src/http/request/parser.c b/src/http/request/parser.c index 1d147e9..f8080a0 100644 --- a/src/http/request/parser.c +++ b/src/http/request/parser.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/src/http/request/parser/parse.c b/src/http/request/parser/parse.c index 6878679..8b5f39f 100644 --- a/src/http/request/parser/parse.c +++ b/src/http/request/parser/parse.c @@ -38,6 +38,7 @@ httpRequestSkip(char ** data) } void httpRequestParserGetRequestLine(HttpRequest, char *); +void httpRequestParserGetHeader(HttpRequest, char *); void httpRequestParserParse(HttpRequestParser this)