diff options
| author | lishu <[email protected]> | 2018-12-05 19:26:56 +0800 |
|---|---|---|
| committer | lishu <[email protected]> | 2018-12-05 19:26:56 +0800 |
| commit | fe846caaa5a0fbfa417fba266b6192ae4c13aec0 (patch) | |
| tree | 42681bdd020f9ff7fb9954de9942d62b0c91beb7 /src/HTTP_Message_Header.h | |
create http project
Diffstat (limited to 'src/HTTP_Message_Header.h')
| -rw-r--r-- | src/HTTP_Message_Header.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/HTTP_Message_Header.h b/src/HTTP_Message_Header.h new file mode 100644 index 0000000..aa733e2 --- /dev/null +++ b/src/HTTP_Message_Header.h @@ -0,0 +1,44 @@ +#ifndef HTTP_MESSAGE_HEADER_H_ +#define HTTP_MESSAGE_HEADER_H_ + +#include "HTTP_Message.h" +#include "HTTP_Analyze.h" + +#define HTTP_START_FLAGS_LEN 9 +#define HTTP_RESPONSE_CODE_LEN 3 +#define HTTP_VERSIONS_LEN 8 + +/*positioning a completeLine*/ +#define HTTP_OLD_MEM 0 +#define HTTP_MALLOC_MEM 1 +#define HTTP_NO_MEM 2 + +typedef enum +{ + HTTP_VERSIONS_UNKNOWN=9, + HTTP_09, + HTTP_10, + HTTP_11 +}http_versions; + + +#ifdef __cplusplus +extern "C" { +#endif + +void http_resetResponseSpace(http_parser_t *a_http, int thread_seq); +char http_judgeHttpMethod(uchar *method, char *data, uchar curdir); +void http_initHttpConnection(http_stream *a_http_stream, int thread_seq, struct streaminfo *a_tcp, void *a_packet); +uchar http_analyseHttpReqResHeader(http_parser_t*a_http, http_stream *a_http_stream, + struct streaminfo *a_tcp, int thread_seq, void *a_packet); +void http_inintRegionParam(http_parser_t *cur_node, int thread_seq); +void http_reseaseHttpInfor(http_stream *a_http_stream, struct streaminfo *a_tcp, int thread_seq, void *a_packet); +uchar http_analyseHttpProxy(http_parser_t *a_http, http_stream *a_http_stream, struct streaminfo *a_tcp, int thread_seq, void *a_packet); +uchar http_processHttpProxy(http_parser_t *a_http, http_stream *a_http_stream, struct streaminfo *a_tcp,int thread_seq,void *a_packet); + + +#ifdef __cplusplus +} +#endif + +#endif /* HTTP_HEADER_H_ */ |
