mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-27 12:26:24 +00:00
Updated net_skeleton, added extra_headers param to mg_send_file()
This commit is contained in:
1 parent
0918df1566
commit
4ca4c862a5
14 files changed
+225
-163
No files matched your search
@@ -6,6 +6,8 @@ CFLAGS = -W -Wall -I../.. $(CFLAGS_EXTRA)
|
||||
SOURCES = $(PROG).c ../../mongoose.c
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
run: $(PROG)
|
||||
./$(PROG)
|
||||
|
||||
$(PROG): $(SOURCES) Makefile
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user