@@ -472,9 +472,9 @@ NGHTTP2_EXTERN nghttp2_vec nghttp2_rcbuf_get_buf(nghttp2_rcbuf *rcbuf);
472472/**
473473 * @function
474474 *
475- * Returns 1 if the underlying buffer is statically allocated,
476- * and 0 otherwise. This can be useful for language bindings that wish to avoid
477- * creating duplicate strings for these buffers.
475+ * Returns nonzero if the underlying buffer is statically allocated,
476+ * and 0 otherwise. This can be useful for language bindings that wish
477+ * to avoid creating duplicate strings for these buffers.
478478 */
479479NGHTTP2_EXTERN int nghttp2_rcbuf_is_static (const nghttp2_rcbuf * rcbuf );
480480
@@ -1750,11 +1750,12 @@ typedef int (*nghttp2_on_header_callback2)(nghttp2_session *session,
17501750 * The parameter and behaviour are similar to
17511751 * :type:`nghttp2_on_header_callback`. The difference is that this
17521752 * callback is only invoked when a invalid header name/value pair is
1753- * received which is silently ignored if this callback is not set.
1754- * Only invalid regular header field are passed to this callback. In
1755- * other words, invalid pseudo header field is not passed to this
1756- * callback. Also header fields which includes upper cased latter are
1757- * also treated as error without passing them to this callback.
1753+ * received which is treated as stream error if this callback is not
1754+ * set. Only invalid regular header field are passed to this
1755+ * callback. In other words, invalid pseudo header field is not
1756+ * passed to this callback. Also header fields which includes upper
1757+ * cased latter are also treated as error without passing them to this
1758+ * callback.
17581759 *
17591760 * This callback is only considered if HTTP messaging validation is
17601761 * turned on (which is on by default, see
@@ -1763,10 +1764,13 @@ typedef int (*nghttp2_on_header_callback2)(nghttp2_session *session,
17631764 * With this callback, application inspects the incoming invalid
17641765 * field, and it also can reset stream from this callback by returning
17651766 * :enum:`NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE`. By default, the
1766- * error code is :enum:`NGHTTP2_INTERNAL_ERROR `. To change the error
1767+ * error code is :enum:`NGHTTP2_PROTOCOL_ERROR `. To change the error
17671768 * code, call `nghttp2_submit_rst_stream()` with the error code of
17681769 * choice in addition to returning
17691770 * :enum:`NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE`.
1771+ *
1772+ * If 0 is returned, the header field is ignored, and the stream is
1773+ * not reset.
17701774 */
17711775typedef int (* nghttp2_on_invalid_header_callback )(
17721776 nghttp2_session * session , const nghttp2_frame * frame , const uint8_t * name ,
@@ -2457,7 +2461,10 @@ nghttp2_option_set_no_recv_client_magic(nghttp2_option *option, int val);
24572461 * <https://tools.ietf.org/html/rfc7540#section-8>`_. See
24582462 * :ref:`http-messaging` section for details. For those applications
24592463 * who use nghttp2 library as non-HTTP use, give nonzero to |val| to
2460- * disable this enforcement.
2464+ * disable this enforcement. Please note that disabling this feature
2465+ * does not change the fundamental client and server model of HTTP.
2466+ * That is, even if the validation is disabled, only client can send
2467+ * requests.
24612468 */
24622469NGHTTP2_EXTERN void nghttp2_option_set_no_http_messaging (nghttp2_option * option ,
24632470 int val );
@@ -3811,9 +3818,8 @@ nghttp2_submit_response(nghttp2_session *session, int32_t stream_id,
38113818 * Submits trailer fields HEADERS against the stream |stream_id|.
38123819 *
38133820 * The |nva| is an array of name/value pair :type:`nghttp2_nv` with
3814- * |nvlen| elements. The application is responsible not to include
3815- * pseudo-header fields (header field whose name starts with ":") in
3816- * |nva|.
3821+ * |nvlen| elements. The application must not include pseudo-header
3822+ * fields (headers whose names starts with ":") in |nva|.
38173823 *
38183824 * This function creates copies of all name/value pairs in |nva|. It
38193825 * also lower-cases all names in |nva|. The order of elements in
0 commit comments