summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlishu <[email protected]>2019-11-26 17:40:49 +0800
committerlishu <[email protected]>2019-11-26 17:40:49 +0800
commit9126414bb62179abab4d77b7b59f792f28b9c3ce (patch)
treeffabc765542b521cbe8dca5a7fd37ba1c9c1a165 /src
parent7c5f60dcf969de028203b14a09a57c9f38be297e (diff)
add libhttp_parser.a
Diffstat (limited to 'src')
-rw-r--r--src/HTTP_Parser.c8
-rw-r--r--src/Makefile4
-rw-r--r--src/http_global.map1
-rw-r--r--src/http_update.txt2
4 files changed, 9 insertions, 6 deletions
diff --git a/src/HTTP_Parser.c b/src/HTTP_Parser.c
index cbb8437..6a4384a 100644
--- a/src/HTTP_Parser.c
+++ b/src/HTTP_Parser.c
@@ -76,8 +76,8 @@ int http_host_parser(const char* buf, uint32 buflen, int http_dir, char** host)
const char* pbuf = buf+offset;
uint32 pbuflen = buflen-offset;
- printf("buf=====================================================\n");
- printf("%s\n", buf);
+ //printf("buf=====================================================\n");
+ //printf("%s\n", buf);
// Ϊ�ṹ�������ڴ�
http_parser *parser = (http_parser*)calloc(1, sizeof(http_parser));
@@ -103,7 +103,7 @@ int http_host_parser(const char* buf, uint32 buflen, int http_dir, char** host)
//ִ�н�������
size_t parsed = http_parser_execute(parser, &http_setting, pbuf, (size_t)pbuflen);
- printf("buflen: %d; parsed: %d\n", pbuflen, parsed);
+ //printf("buflen: %d; parsed: %d\n", pbuflen, parsed);
if(((host_parser*)(parser->data))->is_http_flag == 1)
{
rec = 0;
@@ -274,7 +274,7 @@ void http_test()
{
/*http_host_parser_test����*/
/*
- http_host_parser_test(http_request, DIR_C2S);
+ http_host_parser_test(http_request, DIR_C2S);
http_host_parser_test(http_request_no_host, DIR_C2S);
http_host_parser_test(http_response, DIR_S2C);
http_host_parser_test(http_request_CR, DIR_C2S);
diff --git a/src/Makefile b/src/Makefile
index c323322..8e1efd8 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -18,9 +18,9 @@ LIB += -lMESA_prof_load
LIB += -lMESA_htable
LIB += -lMESA_field_stat
LIB += -ldocumentanalyze
-LIB += -lhttp_parser
+LIB += ./lib/libhttp_parser.a
-LIB_FILE = $(wildcard ../lib/*.a)
+LIB_FILE = $(wildcard ./lib/*.a)
SOURCES = $(wildcard *.c)
OBJECTS = $(SOURCES:.c=.o)
DEPS = $(SOURCES:.c=.d)
diff --git a/src/http_global.map b/src/http_global.map
index ba236d6..1947c3a 100644
--- a/src/http_global.map
+++ b/src/http_global.map
@@ -12,6 +12,7 @@ global:
http_get_method;
http_url_decode;
is_absolute_uri;
+ http_host_parser;
local: *;
};
diff --git a/src/http_update.txt b/src/http_update.txt
index 05f3cb0..a777621 100644
--- a/src/http_update.txt
+++ b/src/http_update.txt
@@ -1,3 +1,5 @@
+
+***************************************************************
20191112
1.����http������������http_host_parser
2.����HTTP_Parser.c�ļ������ڲ�����������