diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-10-17 16:29:05 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-10-17 16:29:05 +0300 |
commit | 44b342f7ca7469f30df44c07936170e7635da149 (patch) | |
tree | c8d70e83cce8d87875f59831e318926e7b317363 | |
parent | 4ad019fd53931ae2346e894afaa469bafdb23d15 (diff) | |
download | libmicrohttpd-44b342f7ca7469f30df44c07936170e7635da149.tar.gz libmicrohttpd-44b342f7ca7469f30df44c07936170e7635da149.zip |
internal.h: fixed doxy for read buffer
MHD always zero-terminate by replacing end-of-line chars and never zero-terminate by
write char after valid read position. Read buffer is NOT longer.
'read_buffer_offset' actually determines the first INVALID position.
-rw-r--r-- | src/microhttpd/internal.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index ab5d948c..0a6ba032 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -1072,16 +1072,15 @@ struct MHD_Connection | |||
1072 | #endif | 1072 | #endif |
1073 | 1073 | ||
1074 | /** | 1074 | /** |
1075 | * Size of @e read_buffer (in bytes). This value indicates | 1075 | * Size of @e read_buffer (in bytes). |
1076 | * how many bytes we're willing to read into the buffer; | 1076 | * This value indicates how many bytes we're willing to read |
1077 | * the real buffer is one byte longer to allow for | 1077 | * into the buffer. |
1078 | * adding zero-termination (when needed). | ||
1079 | */ | 1078 | */ |
1080 | size_t read_buffer_size; | 1079 | size_t read_buffer_size; |
1081 | 1080 | ||
1082 | /** | 1081 | /** |
1083 | * Position where we currently append data in | 1082 | * Position where we currently append data in @e read_buffer (the |
1084 | * @e read_buffer (last valid position). | 1083 | * next char after the last valid position). |
1085 | */ | 1084 | */ |
1086 | size_t read_buffer_offset; | 1085 | size_t read_buffer_offset; |
1087 | 1086 | ||