Doc improvements for websockets_header_size.

This commit is contained in:
Roger A. Light 2019-02-28 00:34:23 +00:00
parent 1aaf5f2348
commit 0632549ce9
3 changed files with 15 additions and 15 deletions

View File

@ -987,11 +987,12 @@
<listitem> <listitem>
<para>Change the websockets headers size. This is a <para>Change the websockets headers size. This is a
global option, it is not possible to set per global option, it is not possible to set per
listener. This is the value passed to libwebsockets listener. This option sets the size of the buffer
max_http_header_data which is used for the buffer size used in the libwebsockets library when reading HTTP
to process HTTP headers. See the libwebsockets documention headers. If you are passing large header data such
for more details. A value of 0 (the default) means to as cookies then you may need to increase this
use libwebsockets' default (which is 1024).</para> value. If left unset, or set to 0, then the default
of 1024 bytes will be used.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>

View File

@ -595,14 +595,13 @@
# libwebsockets documentation for more details. "log_type websockets" must also # libwebsockets documentation for more details. "log_type websockets" must also
# be enabled. # be enabled.
#websockets_log_level 0 #websockets_log_level 0
#
# Change the websockets headers size. This is a global option, it is not # Change the websockets headers size. This is a global option, it is not
# possible to set per listener. This is the value passed to libwebsockets # possible to set per listener. This option sets the size of the buffer used in
# max_http_header_data which is used for the buffer size to process HTTP # the libwebsockets library when reading HTTP headers. If you are passing large
# headers. See the libwebsockets documentation for more details. # header data such as cookies then you may need to increase this value. If left
# A value of 0 (the default) means to use libwebsockets' default (which is # unset, or set to 0, then the default of 1024 bytes will be used.
# 1024). #websockets_headers_size
#websockets_headers_size 0
# If set to true, client connection and disconnection messages will be included # If set to true, client connection and disconnection messages will be included
# in the log. # in the log.

View File

@ -2101,11 +2101,11 @@ int config__read_file_core(struct mosquitto__config *config, bool reload, struct
#endif #endif
}else if(!strcmp(token, "websockets_headers_size")){ }else if(!strcmp(token, "websockets_headers_size")){
#ifdef WITH_WEBSOCKETS #ifdef WITH_WEBSOCKETS
#if defined(LWS_LIBRARY_VERSION_NUMBER) && LWS_LIBRARY_VERSION_NUMBER>=1007000 # if defined(LWS_LIBRARY_VERSION_NUMBER) && LWS_LIBRARY_VERSION_NUMBER>=1007000
if(conf__parse_int(&token, "websockets_headers_size", &config->websockets_headers_size, saveptr)) return MOSQ_ERR_INVAL; if(conf__parse_int(&token, "websockets_headers_size", &config->websockets_headers_size, saveptr)) return MOSQ_ERR_INVAL;
#else # else
log__printf(NULL, MOSQ_LOG_WARNING, "Warning: Websockets headers size require libwebsocket 1.7+"); log__printf(NULL, MOSQ_LOG_WARNING, "Warning: Websockets headers size require libwebsocket 1.7+");
#endif # endif
#else #else
log__printf(NULL, MOSQ_LOG_WARNING, "Warning: Websockets support not available."); log__printf(NULL, MOSQ_LOG_WARNING, "Warning: Websockets support not available.");
#endif #endif