-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttpfunc.h
More file actions
45 lines (34 loc) · 697 Bytes
/
httpfunc.h
File metadata and controls
45 lines (34 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef HTTP_FUNC_H
#define HTTP_FUNC_H
enum
{
REQUEST_TYPE_UNKNOWN,
GET,
POST,
HEAD,
PUT,
DELETE,
};
enum
{
CONNECTION_UNKNOWN,
PERSISTENT,
NON_PERSISTENT,
};
struct http_request
{
int m_enumMethod;
char * m_szHttpVersion;
char * m_szFileRequested;
char * m_szHost;
int m_enumConnectionType;
char * m_szClientAgent;
char * m_szLanguage;
};
typedef struct http_request http_request;
void error(char *msg);
void freeClientRequest(http_request * p_request);
char * getValueFromParameter(char * message, char * parameter);
http_request * createRequest(char * message);
char * handleRequest(http_request * p_request, int * replySize);
#endif //HTTP_FUNC_H