Commit ab21de50dd864950cb12f0525f788dfd977b2dae

Authored by Georg Hopp
1 parent e6766788

remove now obsoleted header_sort

  1 +2012-02-12 04:13:54 +0100 Georg Hopp
  2 +
  3 + * remove now obsoleted header_sort (HEAD, master)
  4 +
1 2012-02-12 04:05:38 +0100 Georg Hopp 5 2012-02-12 04:05:38 +0100 Georg Hopp
2 6
3 - * change response to tree based header storage and make everything work. (HEAD, master) 7 + * change response to tree based header storage and make everything work. (origin/master, origin/HEAD)
4 8
5 2012-02-12 00:05:13 +0100 Georg Hopp 9 2012-02-12 00:05:13 +0100 Georg Hopp
6 10
7 - * changed header hashing to use btree (GNU only). @TODO: make this conditional for other systems. Removed the qsort calls on server->fds making O(2nlogn) to O(n) (origin/master, origin/HEAD) 11 + * changed header hashing to use btree (GNU only). @TODO: make this conditional for other systems. Removed the qsort calls on server->fds making O(2nlogn) to O(n)
8 12
9 2012-02-11 13:52:32 +0100 Georg Hopp 13 2012-02-11 13:52:32 +0100 Georg Hopp
10 14
@@ -9,7 +9,7 @@ LOGGER = logger.c logger/stderr.c logger/syslog.c @@ -9,7 +9,7 @@ LOGGER = logger.c logger/stderr.c logger/syslog.c
9 REQ = http/request.c http/request/queue.c http/request/has_keep_alive.c 9 REQ = http/request.c http/request/queue.c http/request/has_keep_alive.c
10 RESP = http/response.c http/response/404.c http/response/size_get.c \ 10 RESP = http/response.c http/response/404.c http/response/size_get.c \
11 http/response/to_string.c 11 http/response/to_string.c
12 -HEADER = http/header.c http/header/get.c http/header/add.c http/header/sort.c \ 12 +HEADER = http/header.c http/header/get.c http/header/add.c \
13 http/header/size_get.c http/header/to_string.c 13 http/header/size_get.c http/header/to_string.c
14 PARSER = http/request/parser.c http/request/parser/get_header.c \ 14 PARSER = http/request/parser.c http/request/parser/get_header.c \
15 http/request/parser/parse.c http/request/parser/get_request_line.c \ 15 http/request/parser/parse.c http/request/parser/get_request_line.c \
1 -#include <stdlib.h>  
2 -#include <search.h>  
3 -  
4 -#include "http/header.h"  
5 -  
6 -static  
7 -inline  
8 -int  
9 -comp (const void * _a, const void * _b)  
10 -{  
11 - const HttpHeader a = *(const HttpHeader *)_a;  
12 - const HttpHeader b = *(const HttpHeader *)_b;  
13 - return (a->hash < b->hash)? -1 : (a->hash > b->hash)? 1 : 0;  
14 -}  
15 -  
16 -void  
17 -httpHeaderSort(const HttpHeader header[], int nheader)  
18 -{  
19 - qsort((void*)header, nheader, sizeof(HttpHeader), comp);  
20 -}  
21 -  
22 -// vim: set ts=4 sw=4:  
Please register or login to post a comment