Rev 4210 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4210 | Rev 4226 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | dword libHTTP = #alibHTTP; |
3 | dword libHTTP = #alibHTTP; |
4 | char alibHTTP[23] = "/sys/lib/http.obj\0"; |
4 | char alibHTTP[23] = "/sys/lib/http.obj\0"; |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | dword http_lib_init = #aLib_init; |
6 | dword http_lib_init = #aLib_init; |
7 | dword http_get = #aHTTPget; |
- | |
8 | dword http_head = #aHTTPhead; |
- | |
9 | dword http_post = #aHTTPpost; |
- | |
10 | dword http_find_header_field = #aFHF; |
7 | dword http_get = #aHTTPget; |
11 | dword http_process = #aHTTPprocess; |
- | |
12 | dword http_free = #aHTTPfree; |
- | |
13 | dword http_stop = #aHTTPstop; |
- | |
14 | dword uri_escape = #aURIescape; |
- | |
15 | dword uri_unescape = #aURIunescape; |
8 | dword http_process = #aHTTPprocess; |
Line 16... | Line 9... | ||
16 | $DD 2 dup 0 |
9 | $DD 2 dup 0 |
17 | 10 | ||
18 | char aLib_init[9] = "lib_init\0"; |
- | |
19 | char aHTTPget[4] = "get\0"; |
- | |
20 | char aHTTPhead[5] = "head\0"; |
- | |
21 | char aHTTPpost[5] = "post\0"; |
11 | char aLib_init[9] = "lib_init\0"; |
22 | char aFHF[18] = "find_header_field\0"; |
- | |
23 | char aHTTPprocess[8] = "process\0"; |
- | |
24 | char aHTTPfree[5] = "free\0"; |
- | |
25 | char aHTTPstop[5] = "stop\0"; |
- | |
Line 26... | Line 12... | ||
26 | char aURIescape[7] = "escape\0"; |
12 | char aHTTPget[4] = "get\0"; |
27 | char aURIunescape[9] = "unescape\0"; |
13 | char aHTTPprocess[8] = "process\0"; |
28 | 14 | ||
29 | #define FLAG_HTTP11 1 << 0 |
15 | #define FLAG_HTTP11 1 << 0 |
30 | #define FLAG_GOT_HEADER 1 << 1 |
16 | #define FLAG_GOT_HEADER 1 << 1 |
31 | #define FLAG_GOT_DATA 1 << 2 |
- | |
Line 32... | Line 17... | ||
32 | #define FLAG_CONTENT_LENGTH 1 << 3 |
17 | #define FLAG_GOT_DATA 1 << 2 |
33 | #define FLAG_CHUNKED 1 << 4 |
18 | #define FLAG_CONTENT_LENGTH 1 << 3 |
34 | #define FLAG_CONNECTED 1 << 5 |
19 | #define FLAG_CHUNKED 1 << 4 |
35 | 20 | ||
36 | // error flags go into the upper word |
- | |
Line 37... | Line 21... | ||
37 | #define FLAG_INVALID_HEADER 1 << 16 |
21 | // error flags go into the upper word |
38 | #define FLAG_NO_RAM 1 << 17 |
22 | #define FLAG_INVALID_HEADER 1 << 16 |
39 | #define FLAG_SOCKET_ERROR 1 << 18 |
23 | #define FLAG_NO_RAM 1 << 17 |
40 | #define FLAG_TIMEOUT_ERROR 1 << 19 |
24 | #define FLAG_SOCKET_ERROR 1 << 18 |
41 | 25 | ||
42 | struct http_msg{ |
26 | struct http_msg{ |
43 | dword socket; |
- | |
- | 27 | dword socket; |
|
44 | dword flags; |
28 | dword flags; |
45 | dword write_ptr; |
29 | dword write_ptr; |
46 | dword buffer_length; |
30 | dword buffer_length; |
47 | dword chunk_ptr; |
31 | dword chunk_ptr; |
48 | dword timestamp; |
32 |