mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-26 20:38:25 +00:00
Expanded hello example a little
This commit is contained in:
1 parent
67c678270e
commit
4fbfb5d0d0
1 file changed
+3
-2
+3
-2
@@ -4,8 +4,9 @@
|
|||||||
|
|
||||||
// This function will be called by mongoose on every new request
|
// This function will be called by mongoose on every new request
|
||||||
static int index_html(struct mg_connection *conn) {
|
static int index_html(struct mg_connection *conn) {
|
||||||
static const char *reply = "HTTP/1.0 200 OK\r\n\r\nHello!";
|
mg_printf(conn, "HTTP/1.0 200 OK\r\n\r\n"
|
||||||
mg_write(conn, reply, strlen(reply));
|
"Hello! Requested URI is [%s], query string is [%s]", conn->uri,
|
||||||
|
conn->query_string == NULL ? "(none)" : conn->query_string);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user