aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/cookie.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/cookie.c b/examples/cookie.c
index c64ca0c..7cb5f33 100644
--- a/examples/cookie.c
+++ b/examples/cookie.c
@@ -22,7 +22,8 @@ void response(magi_request *r)
magi_response_init(&head); /* Setting defaults. */
/* Set cookie "cookie" with value "monster" on clientside: */
magi_response_cookie(&head, "cookie", "monster");
- magi_response_free(&head); /* Send headers and start sending body: */
+ magi_response_send(&head); /* Send headers, */
+ magi_response_free(&head); /* free them and start sending body: */
printf("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' "
"'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>"
"<html xmlns='http://www.w3.org/1999/xhtml'>"