aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-03 15:44:12 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-03 15:44:12 +0300
commitbcdff026967469e6c9cd1a22db80721712586a8e (patch)
tree129e6f6776144ada4a2c02deb3330dc912a24ee7 /src/include
parent8aa7d23219052cde065b93adf04c5ded067a1fea (diff)
downloadlibmicrohttpd-bcdff026967469e6c9cd1a22db80721712586a8e.tar.gz
libmicrohttpd-bcdff026967469e6c9cd1a22db80721712586a8e.zip
Disallow binary zero in header and cookies.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/microhttpd.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 77e80354..6617dd98 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -2537,12 +2537,10 @@ MHD_set_connection_value (struct MHD_Connection *connection,
2537 2537
2538 2538
2539/** 2539/**
2540 * This function can be used to add an entry to the HTTP headers of a 2540 * This function can be used to add an arbitrary entry to connection.
2541 * connection (so that the #MHD_get_connection_values function will 2541 * This function could add entry with binary zero, which is allowed
2542 * return them -- and the `struct MHD_PostProcessor` will also see 2542 * for #MHD_GET_ARGUMENT_KIND. For other kind on entries it is
2543 * them). This maybe required in certain situations (see Mantis 2543 * recommended to use #MHD_set_connection_value.
2544 * #1399) where (broken) HTTP implementations fail to supply values
2545 * needed by the post processor (or other parts of the application).
2546 * 2544 *
2547 * This function MUST only be called from within the 2545 * This function MUST only be called from within the
2548 * #MHD_AccessHandlerCallback (otherwise, access maybe improperly 2546 * #MHD_AccessHandlerCallback (otherwise, access maybe improperly
@@ -2554,10 +2552,10 @@ MHD_set_connection_value (struct MHD_Connection *connection,
2554 * @param connection the connection for which a 2552 * @param connection the connection for which a
2555 * value should be set 2553 * value should be set
2556 * @param kind kind of the value 2554 * @param kind kind of the value
2557 * @param key key for the value 2555 * @param key key for the value, must be zero-terminated
2558 * @param key_size number of bytes in @a key (excluding 0-terminator for C-strings) 2556 * @param key_size number of bytes in @a key (excluding 0-terminator)
2559 * @param value the value itself 2557 * @param value the value itself, must be zero-terminated
2560 * @param value_size number of bytes in @a value (excluding 0-terminator for C-strings) 2558 * @param value_size number of bytes in @a value (excluding 0-terminator)
2561 * @return #MHD_NO if the operation could not be 2559 * @return #MHD_NO if the operation could not be
2562 * performed due to insufficient memory; 2560 * performed due to insufficient memory;
2563 * #MHD_YES on success 2561 * #MHD_YES on success