cs-3516-assignment-1/server/request_handling.h

22 lines
438 B
C

#ifndef REQUEST_HANDLING_H
#define REQUEST_HANDLING_H
#include <stdio.h>
struct request_line {
char *http_version;
char *method;
char *uri;
};
struct requested_file {
long size;
FILE *file;
};
int parse_request_line(const char *line, struct request_line *parsed_line);
void free_request_line_items(struct request_line *parsed_line);
int get_file_from_uri(const char *uri, struct requested_file *req_file);
#endif