Commit Graph

390 Commits

Author SHA1 Message Date
Michael Kaufmann 83c063346d Stricter checks for pseudo-headers :method and :path
Check the allowed characters for ":method" (see RFC 7230, section 3.2.6) and
":path". For ":path", the space and tab characters are now forbidden, but
other special characters are still allowed for compatibility reasons.

Update genvchartbl.py so that it generates the same table as in the code.

Fixes #1611
2021-08-31 21:47:35 +02:00
Jacky_Yin 8113974b26 doc: update document for nghttp2_session_mem_recv 2021-08-09 23:54:07 +08:00
Tatsuhiro Tsujikawa 3c17299a92 Update enum references 2020-12-29 17:47:57 +09:00
Tomas Krizek 5497a1dfa7
doc: nghttp2_session_send is also affected by max concurrent streams
Further clarify the function also takes into account maximum concurrent
streams.

Closes #691
Closes #817
2020-06-19 17:22:55 +02:00
Tomas Krizek f76ac19627
doc: clarify flow control behaviour for nghttp2_session_send()
The previous wording implied that if send_callback doesn't return
NGHTTP2_ERR_WOULDBLOCK, this function would always send all
submitted requests / data. This is not the case, since flow control can
cause some data to remain queued until WINDOW_UPDATE is received.
2020-06-17 17:19:30 +02:00
James M Snell 336a98feb0
Implement max settings option 2020-05-05 11:55:32 -07:00
Tatsuhiro Tsujikawa 77f5487a58 Add nghttp2_check_authority as public API 2019-11-02 00:33:59 +09:00
Tatsuhiro Tsujikawa 0a6ce87c22 Add nghttp2_option_set_max_outbound_ack 2019-08-14 11:43:55 +09:00
Tatsuhiro Tsujikawa f6644a92af make clang-format 2018-11-09 22:29:18 +09:00
Tatsuhiro Tsujikawa 48998f7239
Merge pull request #1222 from donny-dont/fix/declspec
Use __has_declspec_attribute for shared builds
2018-11-09 22:18:06 +09:00
Tatsuhiro Tsujikawa b80dfaa8a0 Adjustment for RFC 8441 2018-09-23 11:22:30 +09:00
Tatsuhiro Tsujikawa ed7fabcbc2 Add SETTINGS_ENABLE_CONNECT_PROTOCOL 2018-09-23 10:36:30 +09:00
Don d82811303b
Use __has_declspec_attribute for shared builds 2018-09-05 10:01:50 -07:00
Tatsuhiro Tsujikawa 601fbbb4ae Update doc 2018-09-02 15:24:12 +09:00
Tatsuhiro Tsujikawa 4098512b5d Tweak nghttp2_session_set_stream_user_data
nghttp2_session_set_stream_user_data now works for a stream which is
not created yet, but the request which creates the stream is queued.
2018-08-18 17:38:58 +09:00
Tatsuhiro Tsujikawa 880f948684 Enable IndentPPDirectives 2018-06-09 16:21:30 +09:00
Piotr Sikora 2ba1389993 Fix handling of SETTINGS_MAX_CONCURRENT_STREAMS.
The maximum number of outgoing concurrent streams is initially
limited to 100 to avoid issues when the local endpoint submits
lots of requests before receiving initial SETTINGS frame from
the remote endpoint, since sending them at once to the remote
endpoint could lead to rejection of some of the requests.

This initial limit is overwritten with the value advertised in
SETTINGS_MAX_CONCURRENT_STREAMS setting by the remote endpoint,
but previously, it wasn't lifted if the remote endpoint didn't
advertise that setting (implying no limits), in which case the
limit of 100 was retained, even though it was never advertised
by the remote endpoint.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2018-05-30 20:24:00 -07:00
Tatsuhiro Tsujikawa 575bc309b9 Fix typo 2018-05-12 13:07:52 +09:00
Tatsuhiro Tsujikawa 8034221525 Implement ORIGIN frame 2018-05-12 12:35:08 +09:00
Tatsuhiro Tsujikawa 17793e99dc Add nghttp2_session_set_user_data() public API function 2018-02-22 21:02:16 +09:00
Tatsuhiro Tsujikawa 53aeb2c3d7 Fix doc 2017-11-24 22:26:29 +09:00
Tatsuhiro Tsujikawa 43a2a70ae7 Add nghttp2_error_callback2
nghttp2_error_callback2 is an extended version of the existing
nghttp2_error_callback by adding error code parameter.  This
deprecates nghttp2_error_callback.
2017-11-19 16:51:52 +09:00
Tatsuhiro Tsujikawa 0d91e9c255 Update doc 2017-08-18 22:06:43 +09:00
Anna Henningsen eb306f463e
lib: add nghttp2_rcbuf_is_static()
Add a `nghttp2_rcbuf_is_static()` method to tell whether a rcbuf
is statically allocated.

This can be useful for language bindings that wish to avoid
creating duplicate strings for these buffers; concretely, I am
planning to use this in the Node HTTP/2 module that is being
introduced.
2017-08-12 17:48:14 +02:00
Benjamin Peterson b7c95be47c fix up grammar in submit_trailer docs 2017-06-18 23:55:53 -07:00
Tatsuhiro Tsujikawa d3fcbe9a02 Merge branch 'invalid-header-field-error' 2017-05-12 21:37:20 +09:00
Tatsuhiro Tsujikawa f2c539dc70 Clarify the effect of nghttp2_option_set_no_http_messaging 2017-04-29 21:00:20 +09:00
Tatsuhiro Tsujikawa 78d7160a99 Treat incoming invalid regular header field as stream error
Previously, the incoming invalid regular header field was ignored by
default.  With this commit, they are now treated as stream error, and
the stream is reset by default.  The error code used is now
PROTOCOL_ERROR, instead of INTERNAL_ERROR.
2017-04-28 23:46:06 +09:00
Tatsuhiro Tsujikawa f3a5a0a0ec Add nghttp2_option_no_closed_streams
nghttp2_option_no_closed_streams controls whether closed streams are
retained or not.  If nonzero is passed to that function's parameter
val, a session does not retain closed streams.  It may hurt the shape
of priority tree, but can save memory.
2017-02-13 22:33:29 +09:00
Tatsuhiro Tsujikawa 5f31c09410 Mention about nghttp2_data_source_read_length_callback 2017-02-08 00:40:47 +09:00
Tatsuhiro Tsujikawa 052f3a3871 Update doc 2017-01-26 23:40:12 +09:00
Tatsuhiro Tsujikawa 0cf6848646 clang-format-3.9 2016-10-15 18:36:04 +09:00
Tatsuhiro Tsujikawa a591001e7b Update doc 2016-10-15 18:18:52 +09:00
Tatsuhiro Tsujikawa bef3d47c16 Rename functions and nghttp2_debug.h to move debug macro there 2016-10-14 22:59:05 +09:00
Anders Bakken bc3dc6b765 Add set_nghttp2_debug_callback to take advantage of DEBUGF statements in
when building DEBUGBUILD.
2016-10-13 13:24:26 -07:00
Tatsuhiro Tsujikawa 743fc4a3c3 Use the similar naming scheme for table size as 392256e542 2016-09-11 22:25:01 +09:00
Tatsuhiro Tsujikawa 392256e542 Add nghttp2_option_set_max_deflate_dynamic_table_size() API function
nghttp2_option_set_max_deflate_dynamic_table_size function sets the
maximum dynamic table size for header block deflater.  The default
value is 4KiB.
2016-09-11 22:13:59 +09:00
Tatsuhiro Tsujikawa fddb019baf Merge branch 'master' into http2-debug-state-api 2016-08-28 22:20:04 +09:00
Tatsuhiro Tsujikawa 581e0938a9 Allow NGHTTP2_ERR_PAUSE from nghttp2_data_source_read_callback 2016-08-28 21:57:10 +09:00
Tatsuhiro Tsujikawa 79b07f0ce2 Update doc 2016-08-28 00:47:38 +09:00
Tatsuhiro Tsujikawa baa0f60dc8 Add API to get current HPACK dynamic table size 2016-08-26 23:02:51 +09:00
Tatsuhiro Tsujikawa e693f75670 Add nghttp2_session_get_local_settings() API function 2016-08-21 19:33:01 +09:00
Tatsuhiro Tsujikawa 759f6c0b39 Update doc 2016-08-21 19:17:51 +09:00
Tatsuhiro Tsujikawa 5cf21ec187 Add APIs to return the number of data that remote endpoint can send
2 APIs are added.  nghttp2_session_get_local_window_size() returns the
amount of data that the remote endpoint can send without receiving
connection level WINDOW_UPDATE.
nghttp2_session_get_stream_local_window_size() returns the amount of
data that the remote endpoint can send without receiving stream level
WINDOW_UPDATE.
2016-08-21 19:01:51 +09:00
Tatsuhiro Tsujikawa d0fea96e69 Allow nonuniform buffer size in nghttp2_hd_deflate_hd_vec() 2016-08-18 21:23:17 +09:00
Tatsuhiro Tsujikawa 9b864380a5 Use nghttp2_vec in nghttp2_hd_deflate_hd_vec
This change is for the future enhancement where we loose the
requirement about the chunk size for each buffer.
2016-08-17 21:09:29 +09:00
Tatsuhiro Tsujikawa c4d36aeff7 Make parameters const pointer 2016-08-16 10:55:51 +09:00
Tatsuhiro Tsujikawa f50596e355 Merge branch 'master' of https://github.com/weliu/nghttp2 into weliu-master 2016-08-16 09:59:50 +09:00
Wenfeng Liu abf81b5bb7 lib: Add nghttp2_hd_deflate_hd_vec() deflate API to support multiple bufs input 2016-08-15 10:28:45 +00:00
Tatsuhiro Tsujikawa 8579b8a968 Merge pull request #646 from nghttp2/invalid-header-cb
Add nghttp2_on_invalid_header_callback
2016-08-15 11:13:20 +09:00