Commit Graph

554 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 545f24bc1b Remove nghttp2_on_frame_recv_parse_error_callback 2014-01-26 23:23:07 +09:00
Tatsuhiro Tsujikawa 9314e30987 Support transmission of CONTINUATION, change nghttp2_frame_hd
The maximum frame size including header block is still limited
to NGHTTP2_HD_MAX_BUFFER_LENGTH, which is 32KB.
2014-01-26 23:10:33 +09:00
Tatsuhiro Tsujikawa 91401cfe26 Support CONTINUATION frame reception 2014-01-26 20:31:28 +09:00
Tatsuhiro Tsujikawa e7fc2951b8 nghttp2_hd: Define dedicated struct for HPACK deflater and inflater 2014-01-26 17:53:04 +09:00
Tatsuhiro Tsujikawa 45a9f0b637 Remove nghttp2_frame_unpack_* functions 2014-01-26 16:46:18 +09:00
Tatsuhiro Tsujikawa dba2406aba nghttp2_sesson_mem_recv: Process incoming data in streaming fashion
Now incoming data is processed in very small buffer (up to 8 bytes)
using state machine. GOAWAY debug data can get to 16K - 1, and we
don't have callback for it. Since we don't want to buffer that
amount of data just for debugging, we currently discard it.
This change also makes parse_error callback not function.
It probably be removed from API.
2014-01-26 15:44:43 +09:00
Tatsuhiro Tsujikawa 8317559090 nghttp2_hd: Implement stream header inflater
This stream inflater can inflate incoming header block in streaming
fashion. Currently, we buffer up single name/value pair, but we chose
far more smaller buffer size than HTTP/2 frame size.
2014-01-25 18:24:15 +09:00
Tatsuhiro Tsujikawa f8a446fbeb nghttp2_hd: Rewrite huffman decoding 2014-01-24 21:56:19 +09:00
Tatsuhiro Tsujikawa 6540ac1bab Fix crash 2014-01-23 21:25:49 +09:00
Tatsuhiro Tsujikawa 62e394b3e3 Fix memory leak 2014-01-23 00:28:23 +09:00
Tatsuhiro Tsujikawa 201ab1a140 nghttp2_hd: Adjust maximum size to index based on table size 2014-01-21 21:49:53 +09:00
Tatsuhiro Tsujikawa d647799c6f Take int account received data length to check flow control error 2014-01-20 19:50:11 +09:00
Tatsuhiro Tsujikawa 594e1caad6 Code cleanup 2014-01-20 00:01:10 +09:00
Tatsuhiro Tsujikawa d0968ea609 Tear down session if GOAWAY with stream ID != 0 2014-01-19 00:37:45 +09:00
Tatsuhiro Tsujikawa 2a95da6bee Code cleanup 2014-01-18 16:25:44 +09:00
Tatsuhiro Tsujikawa b6d039e888 Make nghttp2_is_fatal public API 2014-01-18 16:24:44 +09:00
Tatsuhiro Tsujikawa 2222b5ab0d Don't return NGHTTP2_ERR_STREAM_CLOSED when submitting DATA, PRIORITY, WU
Remove the check to see that stream exists at the time when submitting
DATA, PRIORITY and WINDOW_UPDATE. We will do this check when we actually
serialize and send them off to the network (or application provided
buffer).
2014-01-18 16:19:28 +09:00
Tatsuhiro Tsujikawa 0f30fb98a9 Update doc 2014-01-18 00:35:41 +09:00
Tatsuhiro Tsujikawa e960c56aad Don't call on_request_recv_callback if header decompression failed 2014-01-17 23:49:40 +09:00
Tatsuhiro Tsujikawa 3882bbebdc Update doc 2014-01-17 22:55:36 +09:00
Tatsuhiro Tsujikawa 22a4e3eab8 Remove nghttp2_session_continue
nghttp2_session_continue is removed. Now just call
nghttp2_session_mem_recv to continue after NGHTTP2_ERR_PAUSE.
2014-01-17 22:52:30 +09:00
Tatsuhiro Tsujikawa b2bf18d40f Code cleanup 2014-01-17 10:15:14 +09:00
Tatsuhiro Tsujikawa 5d535766bf inflate_header_block: Terminate session on compression error
Code cleanup is done as well
2014-01-17 10:13:33 +09:00
Tatsuhiro Tsujikawa 1daf6de102 Update doc 2014-01-17 09:41:39 +09:00
Tatsuhiro Tsujikawa 073e6d3a01 nghttp2_hd: Remove unused variables 2014-01-17 09:36:38 +09:00
Tatsuhiro Tsujikawa 707a0b4103 Move name/value validation functions to src
nghttp2 library itself now accept octet header/value pairs,
completely not restricted by HTTP/1 header name/value rule.
The applications may impose restriction about them using
validators.
2014-01-17 02:16:53 +09:00
Tatsuhiro Tsujikawa 0e4b3d435e Emit header name/value pair using callback functions
Now, in nghttp2_on_frame_recv_callback, nva and nvlen in
HEADERS and PUSH_PROMISE frames are always NULL and 0 respectively.
The header name/value pairs are emitted successive
nghttp2_on_header_callback functions. The end of header fields are
signaled with nghttp2_on_end_headers_callback function.

Since NGHTTP2_ERR_PAUSE for nghttp2_on_frame_recv_callback is
introduced to handle header block, it is now deprecated.
Instead, nghttp2_on_header_callback can be paused using
NGHTTP2_ERR_PAUSE.
2014-01-17 01:49:43 +09:00
Tatsuhiro Tsujikawa 5d788e9753 nghttp2_hd: Move pointer variables before size_t 2014-01-12 19:28:57 +09:00
Tatsuhiro Tsujikawa a85a11c1d9 Update priority for the stream to get response only 2014-01-09 23:30:45 +09:00
Tatsuhiro Tsujikawa 5aa487c5ba nghttp2_stream: flags is now nghttp2_stream_flags
We use this flag to know whether it is pushed or not
2014-01-09 23:01:02 +09:00
Tatsuhiro Tsujikawa 45837a2cfa Ensure PRIORITY frame reception/transmission rule 2014-01-09 22:06:38 +09:00
Tatsuhiro Tsujikawa 95b0b6cb79 Update doc 2014-01-09 21:42:44 +09:00
Tatsuhiro Tsujikawa fe1a39ed10 Allow client side to send PUSH_PROMISE 2014-01-09 21:39:29 +09:00
Tatsuhiro Tsujikawa dacfecf41a lib, src, hdtest: Ensure that config.h is included 2014-01-08 23:30:02 +09:00
Tatsuhiro Tsujikawa 63e7b21b35 nghttp2_hd: Fix lower bound search in static table 2014-01-08 21:32:39 +09:00
Tatsuhiro Tsujikawa 0fb4d32d6a nghttp2_hd: Binary search static table 2014-01-07 23:41:09 +09:00
Tatsuhiro Tsujikawa 468d0fccd3 nghttp2_hd: Use hash to speed up name/value pair search 2014-01-07 22:43:34 +09:00
Tatsuhiro Tsujikawa d703197a50 nghttp2_hd: Mitigate timing attack 2014-01-07 21:51:48 +09:00
Tatsuhiro Tsujikawa 9eb031ce83 nghttp2_hd: Avoid nghttp2_hd_huff_decode_count
Huffman decoding is costly. It is faster to do geometric realloc
than calling nghttp2_hd_huff_decode_count to know the length in
advance.
2014-01-07 21:44:56 +09:00
Tatsuhiro Tsujikawa 4ac1652c70 nghttp2_hd: Remove invalid nghttp2_downcase call 2014-01-07 21:18:45 +09:00
Tatsuhiro Tsujikawa 295a01ef91 Reformat valid character table for header field name/value pair 2014-01-04 11:19:07 +09:00
Tatsuhiro Tsujikawa 888792a949 nghttp2_hd: Allow HTAB and obs-text characters for field-content 2014-01-03 22:46:40 +09:00
Tatsuhiro Tsujikawa 74d82aac56 Update doc 2014-01-02 01:00:11 +09:00
Tatsuhiro Tsujikawa 9cb8754d09 Rename nghttp2_session_fail_session as nghttp2_session_terminate_session 2013-12-26 00:23:07 +09:00
Tatsuhiro Tsujikawa dfcdea894b Move header name/value pair validation to on_*_received functions 2013-12-25 23:38:55 +09:00
Tatsuhiro Tsujikawa 779366640a Update doc 2013-12-24 19:27:03 +09:00
Tatsuhiro Tsujikawa 794633f894 Add nghttp2_session_set_stream_user_data API function 2013-12-23 17:40:34 +09:00
Tatsuhiro Tsujikawa 2c1739a24e Add comment to category in HEADERS and reorder 2013-12-22 19:23:37 +09:00
Tatsuhiro Tsujikawa 7c4dbb6ffc nghttp2_hd: Don't malloc if huffman encoded string has 0 length 2013-12-19 23:19:14 +09:00
Tatsuhiro Tsujikawa 7a9eca1f7d nghttp2_hd: Simplify huffman encode 2013-12-19 23:02:48 +09:00