Skip to content

Commit

Permalink
Sniff MIME types
Browse files Browse the repository at this point in the history
  • Loading branch information
esote committed Feb 1, 2020
1 parent db760a1 commit 35f1f51
Show file tree
Hide file tree
Showing 5 changed files with 399 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROG= filesrv
SRCS= filesrv.c respond.c
SRCS= filesrv.c respond.c mime.c

CFLAGS= -O2 -fstack-protector -D_FORTIFY_SOURCE=2 -pie -fPIE
LDFLAGS= -Wl,-z,now -Wl,-z,relro
Expand Down
2 changes: 0 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
TODO:
handle content range requests

infer file MIME type using https://mimesniff.spec.whatwg.org/
1 change: 1 addition & 0 deletions filesrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
#define FILESRV_H

void respond(int, char *, size_t);
char * sniff(int);

#endif
Loading

0 comments on commit 35f1f51

Please sign in to comment.