aboutsummaryrefslogtreecommitdiff
path: root/doc/chapters/hellobrowser.inc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/chapters/hellobrowser.inc')
-rw-r--r--doc/chapters/hellobrowser.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/chapters/hellobrowser.inc b/doc/chapters/hellobrowser.inc
index 65681de2..bfb5166e 100644
--- a/doc/chapters/hellobrowser.inc
+++ b/doc/chapters/hellobrowser.inc
@@ -54,7 +54,7 @@ HTTP is a rather strict protocol and the client would certainly consider it "ina
54just sent the answer string "as is". Instead, it has to be wrapped with additional information stored in so-called headers and footers. Most of the work in this area is done by the library for us---we 54just sent the answer string "as is". Instead, it has to be wrapped with additional information stored in so-called headers and footers. Most of the work in this area is done by the library for us---we
55just have to ask. Our reply string packed in the necessary layers will be called a "response". 55just have to ask. Our reply string packed in the necessary layers will be called a "response".
56To obtain such a response we hand our data (the reply--string) and its size over to the 56To obtain such a response we hand our data (the reply--string) and its size over to the
57@code{MHD_create_response_from_data} function. The last two parameters basically tell @emph{MHD} 57@code{MHD_create_response_from_buffer} function. The last two parameters basically tell @emph{MHD}
58that we do not want it to dispose the message data for us when it has been sent and there also needs 58that we do not want it to dispose the message data for us when it has been sent and there also needs
59no internal copy to be done because the @emph{constant} string won't change anyway. 59no internal copy to be done because the @emph{constant} string won't change anyway.
60 60
@@ -62,8 +62,8 @@ no internal copy to be done because the @emph{constant} string won't change anyw
62 struct MHD_Response *response; 62 struct MHD_Response *response;
63 int ret; 63 int ret;
64 64
65 response = MHD_create_response_from_data (strlen (page), 65 response = MHD_create_response_from_buffer (strlen (page),
66 (void*) page, MHD_NO, MHD_NO); 66 (void*) page, MHD_RESPMEM_PERSISTENT);
67 67
68@end verbatim 68@end verbatim
69 69