From 4fbfb5d0d015382756d5398994e188640c177deb Mon Sep 17 00:00:00 2001 From: Sergey Lyubka <valenok@gmail.com> Date: Fri, 27 Dec 2013 19:50:14 +0000 Subject: [PATCH] Expanded hello example a little --- examples/hello.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/hello.c b/examples/hello.c index c0369665f..1f584cfef 100644 --- a/examples/hello.c +++ b/examples/hello.c @@ -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; } -- GitLab