You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
367 B
13 lines
367 B
#include <stdio.h>
|
|
|
|
typedef struct {
|
|
int status;
|
|
char* notice;
|
|
char* mime;
|
|
char* protocol;
|
|
} ResHeader;
|
|
|
|
void makeHeader(char* out, ResHeader* header) {
|
|
sprintf(out, "%s %d %s\r\nContent-Type: %s\r\nServer: httpsrv/1.0-indev\r\n\n", /*header->protocol TODO:this breaks everything because newlines*/ "HTTP/1.1", header->status, header->notice, header->mime);
|
|
}
|