Commit Graph

124 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa b0fbb93022 Add PRIORITY_UPDATE frame support
This commit adds PRIORITY_UPDATE frame support.  Applying incoming
PRIORITY_UPDATE frame to server push stream is not implemented.

Client can send PRIORITY_UPDATE frame by calling
nghttp2_submit_priority_update.

Server opts to receive PRIORITY_UPDATE frame by the call
nghttp2_option_set_builtin_recv_extension_type(option,
NGHTTP2_PRIORITY_UPDATE), and passing the option to
nghttp2_session_server_new2 or nghttp2_session_server_new3.
2022-06-13 20:04:30 +09:00
Tatsuhiro Tsujikawa 9812a0bc81 Add SETTINGS_NO_RFC7540_PRIORITIES
Add SETTINGS_NO_RFC7540_PRIORITIES to disable RFC7540 priorities.  If
disabled, streams are served in FIFO.
2022-06-11 16:50:07 +09:00
Tatsuhiro Tsujikawa 7eb179069d Remove useless assignments 2021-11-05 22:51:36 +09:00
Tatsuhiro Tsujikawa cf094bd56b Fix ubsan applying zero offset to null pointer occurred in unit test 2020-06-05 23:13:08 +09:00
Asra Ali 78a56cf66f fix ubsan errors
Signed-off-by: Asra Ali <asraa@google.com>
2020-06-05 23:13:08 +09:00
Tatsuhiro Tsujikawa ed7fabcbc2 Add SETTINGS_ENABLE_CONNECT_PROTOCOL 2018-09-23 10:36:30 +09:00
Tatsuhiro Tsujikawa 8034221525 Implement ORIGIN frame 2018-05-12 12:35:08 +09:00
Tatsuhiro Tsujikawa b1bd6035e8 Fix frame handling 2018-04-07 00:27:55 +09:00
Tatsuhiro Tsujikawa 1b442cb16f Compile with --disable-assert 2017-05-18 23:10:44 +09:00
Tatsuhiro Tsujikawa 85a12429ee Eliminate _U_ macro
Instead use (void)VAR for better compiler compatibility.
2017-03-11 18:45:49 +09:00
Tatsuhiro Tsujikawa ca6f6511f2 Avoid memcpy against NULL src 2016-11-01 23:54:21 +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 40f3779eb1 Pass unknown SETTINGS values to nghttp2_on_frame_recv_callback 2016-04-10 16:36:04 +09:00
Tatsuhiro Tsujikawa d88f962565 Add test for altsvc frame 2016-04-09 22:32:48 +09:00
Tatsuhiro Tsujikawa 795ee8c20f altsvc: Receive ALTSVC frame 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa ecabef2dc7 altsvc: Add ALTSVC frame support 2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa 32446a5197 Revert "Update doc"
This reverts commit 8aac5d6af2.
2016-02-25 21:19:38 +09:00
Tatsuhiro Tsujikawa 8aac5d6af2 Update doc 2016-02-25 00:58:50 +09:00
Tatsuhiro Tsujikawa eb4e402aae Merge branch 'master' into simple-extensions 2015-11-14 22:31:52 +09:00
Tatsuhiro Tsujikawa dfbbb08124 Silence warning with scan-build 2015-11-06 20:07:40 +09:00
Tatsuhiro Tsujikawa 43b230685f Introduce NGHTTP2_NV_FLAG_NO_COPY_NAME and NGHTTP2_NV_FLAG_NO_COPY_VALUE 2015-11-05 22:48:30 +09:00
Tatsuhiro Tsujikawa 3785cf07ba Add simple HTTP/2 extension framework
Application can utilize this framework to send/receive user defined
extension frames.  These frames are expected not to change existing
protocol behaviour.
2015-10-11 17:46:23 +09:00
Tatsuhiro Tsujikawa 93ba75b602 Fix bug that headers in CONTINUATION were ignored after HEADERS with padding 2015-09-25 22:28:03 +09:00
Tatsuhiro Tsujikawa 170f2a144a Fix warning with gcc 2015-09-23 18:26:02 +09:00
Tatsuhiro Tsujikawa 28fe3e7e89 More warning flags for --enable-werror 2015-09-23 16:49:45 +09:00
Tatsuhiro Tsujikawa 8c701bb139 Header table size UINT32_MAX must be accepted 2015-07-30 21:19:46 +09:00
Tatsuhiro Tsujikawa 9eff511c5e Add nghttp2_send_data_callback to send DATA payload without copying
To avoid buffer copy in nghttp2_data_source_read_callback, this commit
introduces NGHTTP2_DATA_FLAG_NO_COPY and nghttp2_send_data_callback.
By using NGHTTP2_DATA_FLAG_NO_COPY in
nghttp2_data_source_read_callback, application can avoid to copy
application data to given buffer.  Instead, application has to
implement nghttp2_send_data_callback to send complete DATA frame by
itself.  We see noticeable performance increase in nghttpd and
tiny-nghttpd using this new feature.  On the other hand, nghttpx does
not show such difference, probably because buffer copy is not
bottleneck.  Using nghttp2_send_data_callback adds complexity, so it
is recommended to measure the performance to see whether this extra
complexity worth it.
2015-04-04 21:23:50 +09:00
Tatsuhiro Tsujikawa 661fb2eb0e NULL-terminate name and value in nghttp2_nv
Guaranteeing NULL-termination is very useful when name or value are
used with C functions which requires NULL-terminated string.
2015-03-23 23:25:57 +09:00
Tatsuhiro Tsujikawa c0ffed7788 Support custom memory allocator
nghttp2_mem structure is introduced to hold custom memory allocator
functions and user supplied pointer.  nghttp2_mem object can be passed
to nghttp2_session_client_new3(), nghttp2_session_server_new3(),
nghttp2_hd_deflate_new2() and nghttp2_hd_inflate_new2() to replace
standard malloc(), free(), calloc() and realloc().  nghttp2_mem
structure has user supplied pointer mem_user_data which can be used as
per session/object memory pool.
2014-12-08 00:55:55 +09:00
Tatsuhiro Tsujikawa 21b48d24e4 Remove altsvc 2014-12-07 23:11:54 +09:00
Tatsuhiro Tsujikawa b1f807abd1 Reformat lines with clang-format-3.5 2014-11-27 23:56:30 +09:00
Alexis La Goutte bac44d7ffb Fix -Werror=unused-parameter using _U_ macro 2014-11-25 17:08:09 +01:00
Tatsuhiro Tsujikawa 1d138accb9 Unify DATA and other frames in nghttp2_outbound_item and save malloc() 2014-10-03 21:31:37 +09:00
Tatsuhiro Tsujikawa b4bb6a6101 Add reserved bits to header and frames
Currently reserved bit is always set to 0.  The addition of reserved
bit is for future extension.
2014-08-28 23:30:42 +09:00
Tatsuhiro Tsujikawa 31528b6267 Use uint32_t for HTTP/2 error_code
h2-14 now allows extensions to define new error codes.  To allow
application callback to access such error codes, we uses uint32_t as
error_code type for structs and function parameters.  Previously we
treated unknown error code as INTERNAL_ERROR, but this change removes
this and unknown error code is passed to application callback as is.
2014-08-25 21:24:04 +09:00
Tatsuhiro Tsujikawa b8a2bf2675 Remove END_SEGMENT flag 2014-07-31 23:05:53 +09:00
Tatsuhiro Tsujikawa 98be65a1eb Allow submission of unknown SETTINGS 2014-07-31 23:05:53 +09:00
Tatsuhiro Tsujikawa 742b28833a Rename NGHTTP2_SETTINGS_MAX_HEADER_SET_SIZE as NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE 2014-07-31 23:05:53 +09:00
Tatsuhiro Tsujikawa 77374ac6e2 Implement SETTINGS_MAX_FRAME_SIZE and SETTINGS_MAX_HEADER_LIST_SIZE 2014-07-31 23:05:53 +09:00
Tatsuhiro Tsujikawa 63398f30dd Extend frame length field to 24 bits 2014-07-31 23:05:52 +09:00
Tatsuhiro Tsujikawa ad60a18fb9 Remove BLOCKED frame 2014-06-24 00:22:41 +09:00
Tatsuhiro Tsujikawa 9294622519 Treat unknown error code as NGHTTP2_INTERNAL_ERROR 2014-06-18 11:53:32 +09:00
Tatsuhiro Tsujikawa 9b174bf5c9 Fix compile error with -Wshorten-64-to-32
The original patch was contributed by Alexis La Goutte
2014-06-11 23:37:16 +09:00
Tatsuhiro Tsujikawa dacc9b2f1c Separate extension frames from core frames
ALTSVC and BLOCKED frames are now extension frames.  To add new
extension frame without modifying nghttp2_frame union, which causes so
name bump, we separated extension frames from core frames.
nghttp2_frame includes generic nghttp2_extension.  The payload member
of nghttp2_extension will point to the structure of extension frame
payload.  The frame types of extension frames are defined in
nghttp2_ext_frame_type.
2014-06-09 23:16:54 +09:00
Tatsuhiro Tsujikawa d4602a0991 Remove reserved field from ALTSVC frame 2014-06-07 19:10:09 +09:00
Tatsuhiro Tsujikawa c46d3dafc6 Remove PAD_HIGH and Pad High field
CONTINUATION now doesn't have padding.
2014-06-07 18:15:36 +09:00
Tatsuhiro Tsujikawa d402ba6fa2 Make settings_id 2 bytes field 2014-06-07 16:37:29 +09:00
Tatsuhiro Tsujikawa 3db8935e20 Remove per-frame compression 2014-06-07 16:04:43 +09:00
Tatsuhiro Tsujikawa 78a55935ac Define constant for the length of priority related fields 2014-05-22 21:41:43 +09:00