Browse Source

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

master
Georg Hopp 14 years ago
parent
commit
4a075de846
  1. 10
      ChangeLog
  2. 2
      src/http/header/get.c
  3. 4
      src/http/header/sort.c
  4. 1
      src/http/request/parser.c
  5. 1
      src/http/request/parser/parse.c

10
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

2
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:

4
src/http/header/sort.c

@ -1,3 +1,5 @@
#include <stdlib.h>
#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:

1
src/http/request/parser.c

@ -1,3 +1,4 @@
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>

1
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)

Loading…
Cancel
Save