cs-3516-assignment-1/common/http_types.h

25 lines
593 B
C
Raw Normal View History

2018-08-30 01:57:35 +00:00
#ifndef HTTP_TYPES_H
#define HTTP_TYPES_H
2018-08-27 14:48:21 +00:00
struct http_message {
char *address;
2018-08-27 17:16:59 +00:00
int port;
char *path;
char *contents;
2018-09-01 19:35:19 +00:00
char *start_line;
struct http_header *headers;
2018-08-27 14:48:21 +00:00
};
2018-08-30 01:57:35 +00:00
2018-09-01 19:35:19 +00:00
struct http_header {
char *name;
char *value;
struct http_header *next_header;
};
struct http_header *insert_header(const char *header_name, const char *header_value, struct http_header *existing_header);
void free_headers(struct http_header *headers);
2018-09-02 00:00:53 +00:00
int case_insensitive_strcmp(const char *a, const char *b);
int headercmp(const struct http_header *header, const char *name);
2018-09-01 19:35:19 +00:00
2018-08-27 14:48:21 +00:00
#endif