Commit 4fbfb5d0 authored by Sergey Lyubka's avatar Sergey Lyubka

Expanded hello example a little

parent 67c67827
......@@ -4,8 +4,9 @@
// This function will be called by mongoose on every new request
static int index_html(struct mg_connection *conn) {
static const char *reply = "HTTP/1.0 200 OK\r\n\r\nHello!";
mg_write(conn, reply, strlen(reply));
mg_printf(conn, "HTTP/1.0 200 OK\r\n\r\n"
"Hello! Requested URI is [%s], query string is [%s]", conn->uri,
conn->query_string == NULL ? "(none)" : conn->query_string);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment