Updated net_skeleton, added extra_headers param to mg_send_file()

This commit is contained in:
Sergey Lyubka committed 2014-10-09 09:26:45 +01:00
1 parent 0918df1566
commit 4ca4c862a5
14 files changed
+225 -163

No files matched your search

+2
View File
@@ -6,6 +6,8 @@ CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA)
SOURCES = $(PROG).c ../../mongoose.c
all: $(PROG)
run: $(PROG)
./$(PROG)
$(PROG): $(SOURCES) Makefile
+1 -1
View File
@@ -8,7 +8,7 @@
static int ev_handler(struct mg_connection *conn, enum mg_event ev) {
switch (ev) {
case MG_REQUEST:
mg_send_file(conn, "send_file.c"); // Also could be a directory, or CGI file
mg_send_file(conn, "send_file.c", NULL); // Also could be a dir, or CGI
return MG_MORE; // It is important to return MG_MORE after mg_send_file!
case MG_AUTH: return MG_TRUE;
default: return MG_FALSE;