2 nghttp2_option_set_no_recv_client_magic
3 =======================================
8 *#include <nghttp2/nghttp2.h>*
10 .. function:: void nghttp2_option_set_no_recv_client_magic(nghttp2_option *option, int val)
13 By default, nghttp2 library, if configured as server, requires
14 first 24 bytes of client magic byte string (MAGIC). In most cases,
15 this will simplify the implementation of server. But sometimes
16 server may want to detect the application protocol based on first
17 few bytes on clear text communication.
19 If this option is used with nonzero *val*, nghttp2 library does not
20 handle MAGIC. It still checks following SETTINGS frame. This
21 means that applications should deal with MAGIC by themselves.
23 If this option is not used or used with zero value, if MAGIC does
24 not match :macro:`NGHTTP2_CLIENT_MAGIC`, `nghttp2_session_recv()`
25 and `nghttp2_session_mem_recv()` will return error
26 :macro:`nghttp2_error.NGHTTP2_ERR_BAD_CLIENT_MAGIC`, which is fatal