💾 Archived View for gemini.rmf-dev.com › repo › Vaati › Upload › files › a006733a2dcb26f8d4ac534cc4d… captured on 2023-11-04 at 12:27:43. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-08)
-=-=-=-=-=-=-
0 /* See LICENSE for license details. */
1 #ifndef PARSER_H
2 #define PARSER_H
3
4 #include <netinet/in.h>
5 #include <stdio.h>
6 #include <time.h>
7
8 #define POST 3
9
10 struct http_request {
11 int socket;
12 int data;
13 struct sockaddr_in addr;
14 char host[512];
15 char contentlength[32];
16 char contenttype[512];
17 char boundary[512];
18 int boundary_found;
19 size_t size;
20 char* content;
21 size_t content_allocated;
22 char packet[32768];
23 size_t length;
24 size_t sent;
25 int done;
26 time_t started;
27 time_t last;
28 char header[1024];
29 char updata[4096];
30 };
31
32 int http_parse(struct http_request* req);
33
34 #endif
35