Skip to content

Instantly share code, notes, and snippets.

@ikariiin
Created September 18, 2017 05:38
Show Gist options
  • Save ikariiin/d3bd839622d69dc082258730f15c9b20 to your computer and use it in GitHub Desktop.
Save ikariiin/d3bd839622d69dc082258730f15c9b20 to your computer and use it in GitHub Desktop.
typedef struct {
char *raw_headers;
char headers[128][512][512];
} HTTPrequest;
void parser_init(char *raw_headers) {
char *token, *key_value = NULL;
token = strtok(raw_headers, "\r\n");
int line_counter = 1;
//HTTPrequest request;
//request.raw_headers = raw_headers;
while (token) {
char *line = token;
if(line_counter != 1) {
}
token = strtok(NULL, "\r\n");
line_counter++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment