diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-03-20 10:46:21 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-03-20 10:46:21 +0100 |
commit | 1b610e5b13b7b96e7b3f372c8da1ec9d840f896a (patch) | |
tree | 981bbabfcff95e4d5b83c0b50c9cec7611e54abb /doc/examples/logging.c | |
parent | e2c268e3796557560fb2ffe3c2e9c18f74fc9471 (diff) | |
download | libmicrohttpd-1b610e5b13b7b96e7b3f372c8da1ec9d840f896a.tar.gz libmicrohttpd-1b610e5b13b7b96e7b3f372c8da1ec9d840f896a.zip |
allow binary zero in unescaped GET arguments (see mailinglist)
Diffstat (limited to 'doc/examples/logging.c')
-rw-r--r-- | doc/examples/logging.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/doc/examples/logging.c b/doc/examples/logging.c index 239fbe7d..a88f461e 100644 --- a/doc/examples/logging.c +++ b/doc/examples/logging.c | |||
@@ -15,11 +15,16 @@ | |||
15 | 15 | ||
16 | 16 | ||
17 | static int | 17 | static int |
18 | print_out_key (void *cls, enum MHD_ValueKind kind, const char *key, | 18 | print_out_key (void *cls, |
19 | const char *value) | 19 | enum MHD_ValueKind kind, |
20 | const char *key, | ||
21 | const char *value, | ||
22 | size_t value_size) | ||
20 | { | 23 | { |
21 | (void)cls; /* Unused. Silent compiler warning. */ | 24 | (void) cls; /* Unused. Silent compiler warning. */ |
22 | (void)kind; /* Unused. Silent compiler warning. */ | 25 | (void) kind; /* Unused. Silent compiler warning. */ |
26 | (void) value_size; | ||
27 | |||
23 | printf ("%s: %s\n", key, value); | 28 | printf ("%s: %s\n", key, value); |
24 | return MHD_YES; | 29 | return MHD_YES; |
25 | } | 30 | } |
@@ -38,7 +43,9 @@ answer_to_connection (void *cls, struct MHD_Connection *connection, | |||
38 | (void)con_cls; /* Unused. Silent compiler warning. */ | 43 | (void)con_cls; /* Unused. Silent compiler warning. */ |
39 | printf ("New %s request for %s using version %s\n", method, url, version); | 44 | printf ("New %s request for %s using version %s\n", method, url, version); |
40 | 45 | ||
41 | MHD_get_connection_values (connection, MHD_HEADER_KIND, print_out_key, | 46 | MHD_get_connection_values (connection, |
47 | MHD_HEADER_KIND, | ||
48 | &print_out_key, | ||
42 | NULL); | 49 | NULL); |
43 | 50 | ||
44 | return MHD_NO; | 51 | return MHD_NO; |