Commit Graph

610 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa fd88c6160d HPACK post -05 updates
* Use 1 Huffman code table for both request and response
* Remove complicated deflater side table size management
* Add encoding context update
* Fix memory leak in inflater
2014-02-13 23:22:52 +09:00
Tatsuhiro Tsujikawa 082876d92d Contribute flow control window for each byte PAD_HIGH and _LOW in DATA
This may help the pathological situation where window is too small.
2014-02-12 21:35:40 +09:00
Tatsuhiro Tsujikawa c7a17093cb Fix compile errors with --enable-maintainer-mode 2014-02-11 21:39:35 +09:00
Tatsuhiro Tsujikawa bac31e844a Add more debug output 2014-02-11 21:35:41 +09:00
Tatsuhiro Tsujikawa 7822bbd7e8 Fix PAD_HIGH and PAD_LOW are not counted in flow control 2014-02-11 21:30:44 +09:00
Tatsuhiro Tsujikawa dbb131d13d Simplify framebufmark calculation for DATA frame 2014-02-11 18:55:22 +09:00
Tatsuhiro Tsujikawa 6364ae1a98 Fix nghttp2_active_outbound_item is not reset on DATA deferred 2014-02-11 18:43:45 +09:00
Tatsuhiro Tsujikawa 16b5e99e88 Bitwise-OR last CONTINUATION flags to first HEADERS flags 2014-02-11 17:30:38 +09:00
Tatsuhiro Tsujikawa 788072af9b Fix HEADERS padding is not added 2014-02-11 17:23:08 +09:00
Tatsuhiro Tsujikawa cf0b880b15 Error if undefined SETTINGS ID is detected in nghttp2_iv_check 2014-02-11 16:53:08 +09:00
Tatsuhiro Tsujikawa 3144bcbe20 Remove unused iframe->error_code 2014-02-11 16:34:42 +09:00
Tatsuhiro Tsujikawa eb2856f3df Add inbound_frame_reset_left() not to forget to reset iframe->buflen 2014-02-11 16:33:07 +09:00
Tatsuhiro Tsujikawa 9865b46905 Don't change state in inbound_frame_handle_pad 2014-02-11 16:24:21 +09:00
Tatsuhiro Tsujikawa e78a2100ec Merge branch 'master' into draft-10 2014-02-11 16:03:42 +09:00
Tatsuhiro Tsujikawa cacf4ecf26 Fix premature header block is not treated as connection error 2014-02-11 16:00:59 +09:00
Tatsuhiro Tsujikawa cbbecfeb41 Fix broken session_detect_idle_stream() 2014-02-11 15:35:44 +09:00
Tatsuhiro Tsujikawa 78d202ac30 Callback based padding from application
Now previous padding options are removed and instead we added
select_padding_callback to select padding length for each frame
by application. If this callback is not implemented by application,
no padding is added.

This change also fixes the broken session_detect_idle_stream()
if stream_id is our side.
2014-02-11 15:28:44 +09:00
Tatsuhiro Tsujikawa 118ed09da5 Allow disabling padding 2014-02-09 23:53:53 +09:00
Tatsuhiro Tsujikawa 5b58b4ace5 Add padding if payload length is zero 2014-02-09 22:01:07 +09:00
Tatsuhiro Tsujikawa 68b5ffc1dc Rename padding related names 2014-02-09 21:46:15 +09:00
Tatsuhiro Tsujikawa 256c97d89b Change default padding size to 16 2014-02-09 18:27:34 +09:00
Tatsuhiro Tsujikawa ba95cd936d Fix flow control error because padding is excluded 2014-02-09 18:26:46 +09:00
Tatsuhiro Tsujikawa a4070be518 Fix on_frame_recv_callback called multiple times if CONTINUATION is involved 2014-02-09 17:00:29 +09:00
Tatsuhiro Tsujikawa dffa078c11 Update doc 2014-02-09 16:49:24 +09:00
Tatsuhiro Tsujikawa 1db2195389 Implement padding for HEADERS and CONTINUATION 2014-02-09 15:17:26 +09:00
Tatsuhiro Tsujikawa 10feab02e8 Fix bufoff_ptr if no padding is made 2014-02-09 12:39:43 +09:00
Tatsuhiro Tsujikawa 9c30ed1a64 Update flags 2014-02-09 12:39:43 +09:00
Tatsuhiro Tsujikawa e9d1ba2539 Handle incoming PAD_HIGH and PAD_LOW in inbound_frame_handle_padding 2014-02-09 12:39:43 +09:00
Tatsuhiro Tsujikawa 2ff3d97b2e Add nghttp2_frame_add_pad to deal with adding pads 2014-02-09 12:39:43 +09:00
Tatsuhiro Tsujikawa b6a0eff8a8 Add more DEBUGFs 2014-02-08 00:32:50 +09:00
Tatsuhiro Tsujikawa 814d0f76f3 Implement DATA frame padding 2014-02-08 00:23:18 +09:00
Tatsuhiro Tsujikawa f26270b5b4 Change SETTINGS payload format according to the spec 2014-02-06 22:06:42 +09:00
Tatsuhiro Tsujikawa d584888601 Renumber frame types, flags and error codes 2014-02-06 21:49:16 +09:00
Tatsuhiro Tsujikawa 40a5756564 Terminate connection if unknown frame type is received 2014-02-06 21:42:49 +09:00
Tatsuhiro Tsujikawa f2c654f898 Fix reception of ENABLE_PUSH ignored; strict check for SETTINGS value 2014-02-06 21:39:58 +09:00
Tatsuhiro Tsujikawa 112b49cb9a Renumber SETTINGS 2014-02-06 00:26:12 +09:00
Tatsuhiro Tsujikawa c79adf6997 Remove flow control disabling feature 2014-02-06 00:23:20 +09:00
Tatsuhiro Tsujikawa 196406da0e Change protocol identifier to h2-10 2014-02-05 23:37:27 +09:00
Tatsuhiro Tsujikawa 9fcd35d063 Update doc 2014-02-05 23:04:42 +09:00
Tatsuhiro Tsujikawa 8c0730c281 Update doc 2014-02-01 19:46:59 +09:00
Tatsuhiro Tsujikawa 8be17f077a Add nghttp2_check_header_name and nghttp2_check_header_value APIs
These are promoted to public API from src/http2.h
2014-02-01 19:31:50 +09:00
Tatsuhiro Tsujikawa 08ff95d402 Detect frame reception for idle stream and make it connection error
Only stream ID which larger than currently used stream ID is
detected as idle.
2014-02-01 17:03:55 +09:00
Tatsuhiro Tsujikawa 2402b46cf3 Fix bug header block is not ignored as properly 2014-01-30 21:26:18 +09:00
Tatsuhiro Tsujikawa ab684a9f30 Remove nghttp2_on_request_recv_callback
It is easy enough to check the end of incoming data by evaluating
frame->hd.flags & NGHTTP2_FLAG_END_STREAM in on_frame_recv_callback
2014-01-29 21:56:01 +09:00
Tatsuhiro Tsujikawa 652228a9d2 Update doc 2014-01-29 21:35:39 +09:00
Tatsuhiro Tsujikawa bbdc015e84 Call on_frame_recv_callback for DATA even if stream has been closed
This makes the callback semantics consistent with the other
frames like HEADERS/PUSH_PROMISE.
2014-01-29 21:34:48 +09:00
Tatsuhiro Tsujikawa e186e01933 Replace on_end_headers_callback with on_begin_headers_callback
Previously, there is inconsistency when on_frame_recv_callback
is called between HEADERS/PUSH_PROMISE and the other frames.
For former case, it is called before header block, in latter
case, it is called after whole frame is received. To make it
consistent, we call on_frame_recv_callback for HEADERS/PUSH_PROMISE
after its frame is fully received. Since on_frame_recv_callback
can signal the end of header block, we replaced on_end_headers_callback
with on_begin_headers_callback, which is called when the reception
of the header block is started.
2014-01-29 21:23:13 +09:00
Tatsuhiro Tsujikawa 4a56c0ae3d Update doc 2014-01-28 01:59:21 +09:00
Tatsuhiro Tsujikawa f308b7b512 Allow NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE return from on_headers_callback 2014-01-28 01:17:23 +09:00
Tatsuhiro Tsujikawa 1382067976 Update doc 2014-01-27 23:31:42 +09:00