@@ -472,9 +472,9 @@ NGHTTP2_EXTERN nghttp2_vec nghttp2_rcbuf_get_buf(nghttp2_rcbuf *rcbuf);
472
472
/**
473
473
* @function
474
474
*
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.
478
478
*/
479
479
NGHTTP2_EXTERN int nghttp2_rcbuf_is_static (const nghttp2_rcbuf * rcbuf );
480
480
@@ -1750,11 +1750,12 @@ typedef int (*nghttp2_on_header_callback2)(nghttp2_session *session,
1750
1750
* The parameter and behaviour are similar to
1751
1751
* :type:`nghttp2_on_header_callback`. The difference is that this
1752
1752
* 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.
1758
1759
*
1759
1760
* This callback is only considered if HTTP messaging validation is
1760
1761
* turned on (which is on by default, see
@@ -1763,10 +1764,13 @@ typedef int (*nghttp2_on_header_callback2)(nghttp2_session *session,
1763
1764
* With this callback, application inspects the incoming invalid
1764
1765
* field, and it also can reset stream from this callback by returning
1765
1766
* :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
1767
1768
* code, call `nghttp2_submit_rst_stream()` with the error code of
1768
1769
* choice in addition to returning
1769
1770
* :enum:`NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE`.
1771
+ *
1772
+ * If 0 is returned, the header field is ignored, and the stream is
1773
+ * not reset.
1770
1774
*/
1771
1775
typedef int (* nghttp2_on_invalid_header_callback )(
1772
1776
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);
2457
2461
* <https://tools.ietf.org/html/rfc7540#section-8>`_. See
2458
2462
* :ref:`http-messaging` section for details. For those applications
2459
2463
* 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.
2461
2468
*/
2462
2469
NGHTTP2_EXTERN void nghttp2_option_set_no_http_messaging (nghttp2_option * option ,
2463
2470
int val );
@@ -3811,9 +3818,8 @@ nghttp2_submit_response(nghttp2_session *session, int32_t stream_id,
3811
3818
* Submits trailer fields HEADERS against the stream |stream_id|.
3812
3819
*
3813
3820
* 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|.
3817
3823
*
3818
3824
* This function creates copies of all name/value pairs in |nva|. It
3819
3825
* also lower-cases all names in |nva|. The order of elements in
0 commit comments