more comments in big_upload.c

This commit is contained in:
Sergey Lyubka 2014-06-24 17:09:00 +01:00
parent e4c71425c9
commit 708af6d9c5

View File

@ -29,7 +29,7 @@ static int handle_request(struct mg_connection *conn) {
conn->connection_param = p; conn->connection_param = p;
mg_send_header(conn, "Content-Type", "text/html"); mg_send_header(conn, "Content-Type", "text/html");
} }
return MG_MORE; return MG_MORE; // Tell mongoose to keep this connection open
} else { } else {
mg_printf_data(conn, "%s", mg_printf_data(conn, "%s",
"<html><body>Upload example." "<html><body>Upload example."
@ -38,7 +38,7 @@ static int handle_request(struct mg_connection *conn) {
"<input type=\"file\" name=\"file\" /> <br/>" "<input type=\"file\" name=\"file\" /> <br/>"
"<input type=\"submit\" value=\"Upload\" />" "<input type=\"submit\" value=\"Upload\" />"
"</form></body></html>"); "</form></body></html>");
return MG_TRUE; return MG_TRUE; // Tell mongoose to close this connection
} }
} }
@ -59,10 +59,10 @@ static int handle_poll(struct mg_connection *conn) {
fclose(p->fp); fclose(p->fp);
free(p); free(p);
conn->connection_param = NULL; conn->connection_param = NULL;
return MG_TRUE; return MG_TRUE; // Tell mongoose to close this connection
} }
} }
return MG_FALSE; return MG_FALSE; // Tell mongoose to keep this connection open
} }
static int ev_handler(struct mg_connection *conn, enum mg_event ev) { static int ev_handler(struct mg_connection *conn, enum mg_event ev) {