Parsing HTTP header

This commit is contained in:
2020-12-12 17:13:36 +01:00
parent b4a4f12e9c
commit 687d918677
4 changed files with 159 additions and 16 deletions

View File

@ -8,12 +8,16 @@
#ifndef NECRONDA_SERVER_HTTP_H
#define NECRONDA_SERVER_HTTP_H
typedef struct {
char field_num;
char *fields[64][2];
} http_hdr;
typedef struct {
char method[8];
char *uri;
char version[3];
char field_num;
char *fields[64][2];
http_hdr hdr;
} http_req;
int http_receive_request(sock *client, http_req *req);