diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-08 23:38:07 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-08 23:38:07 +0200 |
commit | 89d2ef97322ff5276e9a437e616a1e07529e0b26 (patch) | |
tree | c556b686eb323ca61036d69774553056ac8e2361 /doc | |
parent | de872dea2d88f183c3f434c694acdcdb373f639c (diff) | |
parent | da0585902ce08aacf97f7711b85343d4d45c80fe (diff) | |
download | libmicrohttpd-89d2ef97322ff5276e9a437e616a1e07529e0b26.tar.gz libmicrohttpd-89d2ef97322ff5276e9a437e616a1e07529e0b26.zip |
define and use 'enum MHD_Result' (merge)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/chapters/basicauthentication.inc | 4 | ||||
-rw-r--r-- | doc/chapters/hellobrowser.inc | 4 | ||||
-rw-r--r-- | doc/chapters/introduction.inc | 2 | ||||
-rw-r--r-- | doc/chapters/largerpost.inc | 2 | ||||
-rw-r--r-- | doc/chapters/responseheaders.inc | 6 | ||||
-rw-r--r-- | doc/chapters/tlsauthentication.inc | 2 | ||||
-rw-r--r-- | doc/examples/responseheaders.c | 2 | ||||
-rw-r--r-- | doc/examples/sessions.c | 2 | ||||
-rw-r--r-- | doc/libmicrohttpd.texi | 4 |
9 files changed, 14 insertions, 14 deletions
diff --git a/doc/chapters/basicauthentication.inc b/doc/chapters/basicauthentication.inc index bbdd3641..cfcc96ff 100644 --- a/doc/chapters/basicauthentication.inc +++ b/doc/chapters/basicauthentication.inc | |||
@@ -14,7 +14,7 @@ GET /picture.png?mypassword | |||
14 | 14 | ||
15 | In the rare situation where the client is customized enough and the connection occurs | 15 | In the rare situation where the client is customized enough and the connection occurs |
16 | through secured lines (e.g., a embedded device directly attached to another via wire) | 16 | through secured lines (e.g., a embedded device directly attached to another via wire) |
17 | and where the ability to embedd a password in the URI or to pass on a URI with a | 17 | and where the ability to embed a password in the URI or to pass on a URI with a |
18 | password are desired, this can be a reasonable choice. | 18 | password are desired, this can be a reasonable choice. |
19 | 19 | ||
20 | But when it is assumed that the user connecting does so with an ordinary Internet browser, | 20 | But when it is assumed that the user connecting does so with an ordinary Internet browser, |
@@ -37,7 +37,7 @@ Initially, the pointer this parameter references is set by @emph{MHD} in the cal | |||
37 | also be "remembered" on the next call (for the same connection). | 37 | also be "remembered" on the next call (for the same connection). |
38 | Thus, we will generate no response until the parameter is non-null---implying the callback was | 38 | Thus, we will generate no response until the parameter is non-null---implying the callback was |
39 | called before at least once. We do not need to share information between different calls of the callback, | 39 | called before at least once. We do not need to share information between different calls of the callback, |
40 | so we can set the parameter to any adress that is assured to be not null. The pointer to the | 40 | so we can set the parameter to any address that is assured to be not null. The pointer to the |
41 | @code{connection} structure will be pointing to a legal address, so we take this. | 41 | @code{connection} structure will be pointing to a legal address, so we take this. |
42 | 42 | ||
43 | The first time @code{answer_to_connection} is called, we will not even look at the headers. | 43 | The first time @code{answer_to_connection} is called, we will not even look at the headers. |
diff --git a/doc/chapters/hellobrowser.inc b/doc/chapters/hellobrowser.inc index 983cfb6a..ac7a5fe1 100644 --- a/doc/chapters/hellobrowser.inc +++ b/doc/chapters/hellobrowser.inc | |||
@@ -116,7 +116,7 @@ information (which could be passed via the next parameter) so the next (sixth) p | |||
116 | we do not need to pass extra options to the daemon so we just write the MHD_OPTION_END as the last parameter. | 116 | we do not need to pass extra options to the daemon so we just write the MHD_OPTION_END as the last parameter. |
117 | 117 | ||
118 | As the server daemon runs in the background in its own thread, the execution flow in our main | 118 | As the server daemon runs in the background in its own thread, the execution flow in our main |
119 | function will contine right after the call. Because of this, we must delay the execution flow in the | 119 | function will continue right after the call. Because of this, we must delay the execution flow in the |
120 | main thread or else the program will terminate prematurely. We let it pause in a processing-time | 120 | main thread or else the program will terminate prematurely. We let it pause in a processing-time |
121 | friendly manner by waiting for the enter key to be pressed. In the end, we stop the daemon so it can | 121 | friendly manner by waiting for the enter key to be pressed. In the end, we stop the daemon so it can |
122 | do its cleanup tasks. | 122 | do its cleanup tasks. |
@@ -161,7 +161,7 @@ right after the response has been transferred then. This is typically not what | |||
161 | disables HTTP pipelining. The correct approach is to simply not queue a message on the first | 161 | disables HTTP pipelining. The correct approach is to simply not queue a message on the first |
162 | callback unless there is an error. The @code{void**} argument to the callback provides a location | 162 | callback unless there is an error. The @code{void**} argument to the callback provides a location |
163 | for storing information about the history of the connection; for the first call, the pointer | 163 | for storing information about the history of the connection; for the first call, the pointer |
164 | will point to NULL. A simplistic way to differenciate the first call from others is to check | 164 | will point to NULL. A simplistic way to differentiate the first call from others is to check |
165 | if the pointer is NULL and set it to a non-NULL value during the first call. | 165 | if the pointer is NULL and set it to a non-NULL value during the first call. |
166 | 166 | ||
167 | Both of these issues you will find addressed in the official @code{minimal_example.c} residing in | 167 | Both of these issues you will find addressed in the official @code{minimal_example.c} residing in |
diff --git a/doc/chapters/introduction.inc b/doc/chapters/introduction.inc index 95caf9a5..2845d35b 100644 --- a/doc/chapters/introduction.inc +++ b/doc/chapters/introduction.inc | |||
@@ -19,5 +19,5 @@ built on similar systems. | |||
19 | @section History | 19 | @section History |
20 | 20 | ||
21 | This tutorial was originally written by Sebastian Gerhardt for MHD | 21 | This tutorial was originally written by Sebastian Gerhardt for MHD |
22 | 0.4.0. It was slighly polished and updated to MHD 0.9.0 by Christian | 22 | 0.4.0. It was slightly polished and updated to MHD 0.9.0 by Christian |
23 | Grothoff. \ No newline at end of file | 23 | Grothoff. \ No newline at end of file |
diff --git a/doc/chapters/largerpost.inc b/doc/chapters/largerpost.inc index 1f60028f..11479382 100644 --- a/doc/chapters/largerpost.inc +++ b/doc/chapters/largerpost.inc | |||
@@ -49,7 +49,7 @@ We want the server to report internal errors, such as memory shortage or file ac | |||
49 | adequately. | 49 | adequately. |
50 | @verbatim | 50 | @verbatim |
51 | const char* servererrorpage | 51 | const char* servererrorpage |
52 | = "<html><body>An internal server error has occured.</body></html>"; | 52 | = "<html><body>An internal server error has occurred.</body></html>"; |
53 | const char* fileexistspage | 53 | const char* fileexistspage |
54 | = "<html><body>This file already exists.</body></html>"; | 54 | = "<html><body>This file already exists.</body></html>"; |
55 | @end verbatim | 55 | @end verbatim |
diff --git a/doc/chapters/responseheaders.inc b/doc/chapters/responseheaders.inc index ece7ce1c..0b1c67e2 100644 --- a/doc/chapters/responseheaders.inc +++ b/doc/chapters/responseheaders.inc | |||
@@ -60,7 +60,7 @@ server side and if so, the client should be informed with @code{MHD_HTTP_INTERNA | |||
60 | /* error accessing file */ | 60 | /* error accessing file */ |
61 | if (fd != -1) close (fd); | 61 | if (fd != -1) close (fd); |
62 | const char *errorstr = | 62 | const char *errorstr = |
63 | "<html><body>An internal server error has occured!\ | 63 | "<html><body>An internal server error has occurred!\ |
64 | </body></html>"; | 64 | </body></html>"; |
65 | response = | 65 | response = |
66 | MHD_create_response_from_buffer (strlen (errorstr), | 66 | MHD_create_response_from_buffer (strlen (errorstr), |
@@ -79,7 +79,7 @@ server side and if so, the client should be informed with @code{MHD_HTTP_INTERNA | |||
79 | return MHD_NO; | 79 | return MHD_NO; |
80 | if (!ret) | 80 | if (!ret) |
81 | { | 81 | { |
82 | const char *errorstr = "<html><body>An internal server error has occured!\ | 82 | const char *errorstr = "<html><body>An internal server error has occurred!\ |
83 | </body></html>"; | 83 | </body></html>"; |
84 | 84 | ||
85 | if (buffer) free(buffer); | 85 | if (buffer) free(buffer); |
@@ -120,7 +120,7 @@ But in the case of success a response will be constructed directly from the file | |||
120 | @end verbatim | 120 | @end verbatim |
121 | @noindent | 121 | @noindent |
122 | 122 | ||
123 | Note that the response object will take care of closing the file desciptor for us. | 123 | Note that the response object will take care of closing the file descriptor for us. |
124 | 124 | ||
125 | Up to this point, there was little new. The actual novelty is that we enhance the header with the | 125 | Up to this point, there was little new. The actual novelty is that we enhance the header with the |
126 | meta data about the content. Aware of the field's name we want to add, it is as easy as that: | 126 | meta data about the content. Aware of the field's name we want to add, it is as easy as that: |
diff --git a/doc/chapters/tlsauthentication.inc b/doc/chapters/tlsauthentication.inc index 8bdfa764..fdb3d920 100644 --- a/doc/chapters/tlsauthentication.inc +++ b/doc/chapters/tlsauthentication.inc | |||
@@ -65,7 +65,7 @@ main () | |||
65 | @end verbatim | 65 | @end verbatim |
66 | @noindent | 66 | @noindent |
67 | 67 | ||
68 | and then we point the @emph{MHD} daemon to it upon initalization. | 68 | and then we point the @emph{MHD} daemon to it upon initialization. |
69 | @verbatim | 69 | @verbatim |
70 | 70 | ||
71 | daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL, | 71 | daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL, |
diff --git a/doc/examples/responseheaders.c b/doc/examples/responseheaders.c index 5c0580b6..f1cf939c 100644 --- a/doc/examples/responseheaders.c +++ b/doc/examples/responseheaders.c | |||
@@ -43,7 +43,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection, | |||
43 | (0 != fstat (fd, &sbuf)) ) | 43 | (0 != fstat (fd, &sbuf)) ) |
44 | { | 44 | { |
45 | const char *errorstr = | 45 | const char *errorstr = |
46 | "<html><body>An internal server error has occured!\ | 46 | "<html><body>An internal server error has occurred!\ |
47 | </body></html>"; | 47 | </body></html>"; |
48 | /* error accessing file */ | 48 | /* error accessing file */ |
49 | if (fd != -1) | 49 | if (fd != -1) |
diff --git a/doc/examples/sessions.c b/doc/examples/sessions.c index adabc610..6d6cf5ba 100644 --- a/doc/examples/sessions.c +++ b/doc/examples/sessions.c | |||
@@ -557,7 +557,7 @@ post_iterator (void *cls, | |||
557 | * can be set with the MHD_OPTION_NOTIFY_COMPLETED). | 557 | * can be set with the MHD_OPTION_NOTIFY_COMPLETED). |
558 | * Initially, <tt>*con_cls</tt> will be NULL. | 558 | * Initially, <tt>*con_cls</tt> will be NULL. |
559 | * @return MHS_YES if the connection was handled successfully, | 559 | * @return MHS_YES if the connection was handled successfully, |
560 | * MHS_NO if the socket must be closed due to a serios | 560 | * MHS_NO if the socket must be closed due to a serious |
561 | * error while handling the request | 561 | * error while handling the request |
562 | */ | 562 | */ |
563 | static enum MHD_Result | 563 | static enum MHD_Result |
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi index e89f75ed..419cf44a 100644 --- a/doc/libmicrohttpd.texi +++ b/doc/libmicrohttpd.texi | |||
@@ -539,7 +539,7 @@ connections). | |||
539 | Enable optimizations to aggressively improve performance. | 539 | Enable optimizations to aggressively improve performance. |
540 | 540 | ||
541 | Currently, the optimizations this option enables are based on | 541 | Currently, the optimizations this option enables are based on |
542 | opportunistic reads and writes. Bascially, MHD will simply try to | 542 | opportunistic reads and writes. Basically, MHD will simply try to |
543 | read or write or accept on a socket before checking that the socket is | 543 | read or write or accept on a socket before checking that the socket is |
544 | ready for IO using the event loop mechanism. As the sockets are | 544 | ready for IO using the event loop mechanism. As the sockets are |
545 | non-blocking, this may fail (at a loss of performance), but generally | 545 | non-blocking, this may fail (at a loss of performance), but generally |
@@ -1761,7 +1761,7 @@ will be set to the timeout (in milliseconds). | |||
1761 | @end table | 1761 | @end table |
1762 | 1762 | ||
1763 | Return @code{MHD_YES} on success, @code{MHD_NO} if timeouts are not used | 1763 | Return @code{MHD_YES} on success, @code{MHD_NO} if timeouts are not used |
1764 | (or no connections exist that would necessiate the use of a timeout | 1764 | (or no connections exist that would necessitate the use of a timeout |
1765 | right now). | 1765 | right now). |
1766 | @end deftypefun | 1766 | @end deftypefun |
1767 | 1767 | ||