diff --git a/docs/http/server_example.md b/docs/http/server_example.md index a244d647d2acd09c4bade5d847579aac00a5dd03..225beb406be55ed5fb63fb2d4de0884e5ddac9c9 100644 --- a/docs/http/server_example.md +++ b/docs/http/server_example.md @@ -30,8 +30,8 @@ static void ev_handler(struct mg_connection *c, int ev, void *p) { // We have received an HTTP request. Parsed request is contained in `hm`. // Send HTTP reply to the client which shows full original request. - mg_send_head(c, 200, hm.message.len, "Content-Type: text/plain"); - mg_printf(c, "%.*s", hm.message.len, hm.message.p); + mg_send_head(c, 200, hm->message.len, "Content-Type: text/plain"); + mg_printf(c, "%.*s", (int)hm->message.len, hm->message.p); } }