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

25 lines
593 B
C

#ifndef HTTP_TYPES_H
#define HTTP_TYPES_H
struct http_message {
char *address;
int port;
char *path;
char *contents;
char *start_line;
struct http_header *headers;
};
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);
int case_insensitive_strcmp(const char *a, const char *b);
int headercmp(const struct http_header *header, const char *name);
#endif