aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-07-13 08:33:09 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-07-13 08:33:09 +0300
commit2aabe59373c29410c00ae59cd86cb475c961b56c (patch)
tree43063644a70dee80276cc65b8a0509c154c22473 /examples
parentc452c3dc47bacf1cb4dfd7a8129d62fa8819282e (diff)
downloadmagi-2aabe59373c29410c00ae59cd86cb475c961b56c.tar
magi-2aabe59373c29410c00ae59cd86cb475c961b56c.tar.xz
magi-2aabe59373c29410c00ae59cd86cb475c961b56c.zip
magi_response_send, urlenc docs.
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'>"