Tatsuhiro Tsujikawa
9294622519
Treat unknown error code as NGHTTP2_INTERNAL_ERROR
2014-06-18 11:53:32 +09:00
Tatsuhiro Tsujikawa
b78a51da0e
Support graceful shutdown using multiple GOAWAY
...
Add last_stream_id parameter to nghttp2_submit_goaway(). To terminate
connection immediately with application chosen last stream ID,
nghttp2_session_terminate_session2() was added.
2014-06-18 11:35:08 +09:00
Tatsuhiro Tsujikawa
975524a125
Don't send GOAWAY with last stream ID larger than the value previously sent
2014-06-18 11:03:55 +09:00
Tatsuhiro Tsujikawa
817e1ce2a7
Rename last_stream_id in nghttp2_session to remote_last_stream_id
...
This commits also fixes last stream ID in GOAWAY uses wrong stream ID.
2014-06-18 10:56:32 +09:00
Tatsuhiro Tsujikawa
62900cd85b
Allow multiple transmission of GOAWAY frame
2014-06-18 10:51:33 +09:00
Tatsuhiro Tsujikawa
174e410b93
Use hex in nghttp2_error_code and nghttp2_settings_id
2014-06-18 10:48:31 +09:00
Tatsuhiro Tsujikawa
a5af621947
Change protocol ID to h2-13
2014-06-18 09:42:51 +09:00
Alexis La Goutte
9a3cdeb7e6
Fix some other shorten-64-to-32 casting error found by MSVC (64bits)
...
Thanks for Pascal
2014-06-16 19:17:49 +02:00
Alexis La Goutte
c9b6371977
When assertions is disable, there is a warning about unused check_index_range function
...
Make the check for a valid index range a macro, so the compiler doesn't
whine if it's not used, but it's available if it *is* used.
2014-06-16 18:52:11 +02:00
Tatsuhiro Tsujikawa
7f6ddd0f2e
Update huffman code table
2014-06-16 23:03:55 +09:00
Tatsuhiro Tsujikawa
f85a213fb1
Update static header table
2014-06-14 22:24:47 +09:00
Tatsuhiro Tsujikawa
dd006f8a79
Change protocol ID to h2-lc
2014-06-12 22:51:30 +09:00
Alexis La Goutte
a15d4fc306
Fix nghttp2_hd_huffman.h:41:31: warning: comma at end of enumerator list [-Wpedantic]
2014-06-11 23:43:10 +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
f0f5342cd4
Update doc
2014-06-11 01:40:20 +09:00
Tatsuhiro Tsujikawa
cfcecca751
Make return type of inbound_frame_set_settings_entry void
2014-06-10 21:32:20 +09:00
Tatsuhiro Tsujikawa
2878e1e258
Refactor storage of settings
...
Now local and remote settings values are stored in dedicated structure
nghttp2_settings_storage.
2014-06-10 21:29:19 +09:00
Tatsuhiro Tsujikawa
4596f73ee0
Fix unused header_cb_arg structure
2014-06-09 23:21:55 +09:00
Tatsuhiro Tsujikawa
caf3e1c035
Fix compile error with --enable-debug
2014-06-09 23:21:30 +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
317b8baa4f
Set HTTP/2 protocol id to h2-13 for now
2014-06-07 19:39:14 +09:00
Tatsuhiro Tsujikawa
d4602a0991
Remove reserved field from ALTSVC frame
2014-06-07 19:10:09 +09:00
Tatsuhiro Tsujikawa
3daeadcb07
Remove bogus comments
2014-06-07 18:51:20 +09:00
Tatsuhiro Tsujikawa
19729962a3
Check stream_id is nonzero for DATA, HEADERS, PRIORITY, RST_STREAM, PUSH_PROMISE
2014-06-07 18:48:37 +09:00
Tatsuhiro Tsujikawa
bfaab30733
Allow transmission and reception of PRIORITY frame to a closed stream
2014-06-07 18:36:58 +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
70c86979e8
Ignore unknown settings ID
2014-06-07 16:41:36 +09:00
Tatsuhiro Tsujikawa
d402ba6fa2
Make settings_id 2 bytes field
2014-06-07 16:37:29 +09:00
Tatsuhiro Tsujikawa
458ccb3681
Ignore unknown frame types
...
Unexpected CONTINUATION frame is handled separately as connection
error.
2014-06-07 16:30:55 +09:00
Tatsuhiro Tsujikawa
3db8935e20
Remove per-frame compression
2014-06-07 16:04:43 +09:00
Tatsuhiro Tsujikawa
eb0a894ede
Merge branch 'Wshadow' of https://github.com/alagoutte/nghttp2 into alagoutte-Wshadow
2014-06-04 23:34:04 +09:00
Alexis La Goutte
6b08534ffc
Fix declaration of ‘index’ shadows a global declaration [-Werror=shadow]
...
I have this error with some old gcc (4.6) release (Ubuntu 12.04 or Travis...)
2014-06-03 10:20:05 +02:00
Tatsuhiro Tsujikawa
99aaaccf03
Update doc
2014-06-02 22:33:23 +09:00
Tatsuhiro Tsujikawa
4f7223e89f
Add note to manual how to submit frames to new stream ID
2014-05-31 22:01:18 +09:00
Tatsuhiro Tsujikawa
88b69bb669
Reduce huffman decoding table
...
Previously we have uint16_t as state member variable in
nghttp2_huff_decode structure to express -1 as failure. This is
because we have 256 valid states. However, we can express failed
state using flags member variable and make state uint8_t. This commit
does this and as a result the size of decoding table is reduced.
2014-05-31 00:19:30 +09:00
Tatsuhiro Tsujikawa
832f2fc00f
Call on_data_chunk_recv_callback only when stream is active
2014-05-29 22:18:52 +09:00
Tatsuhiro Tsujikawa
d113055899
nghttp2_hd: Use single buffer for an name/value pair
...
Previously we use 2 separate buffer for each name and value. The
problem is we would waste buffer space for name because it is usually
small. Also tuning buffer size for each buffer separately is not
elegant and current HTTP server practice is that one buffer for 1
name/value pair. This commit unifies 2 buffers into 1.
2014-05-28 23:33:37 +09:00
Tatsuhiro Tsujikawa
5e6a2fa256
Assert ctx->state >= 0 in huffman decoding
2014-05-28 00:30:11 +09:00
Tatsuhiro Tsujikawa
d733c87567
Make state in nghttp2_hd_huff_decode_context int16_t to make compiler happy
2014-05-26 21:50:54 +09:00
Tatsuhiro Tsujikawa
589d3e71a3
Merge branch 'misc' of https://github.com/alagoutte/nghttp2 into alagoutte-misc
2014-05-26 21:48:30 +09:00
Alexis La Goutte
db354b228a
Remove unused include (stdint.h)
2014-05-26 08:58:15 +02:00
Tatsuhiro Tsujikawa
9677788317
Don't count closed streams in nghttp2_session_want_{read,write}
2014-05-23 22:23:38 +09:00
Tatsuhiro Tsujikawa
78a55935ac
Define constant for the length of priority related fields
2014-05-22 21:41:43 +09:00
Tatsuhiro Tsujikawa
2aa84019c7
Define constants for ALTSVC frame parsing
2014-05-22 21:36:12 +09:00
Tatsuhiro Tsujikawa
1ac028e166
Take into account that pending_local_max_concurrent_stream could be too large
...
pending_local_max_concurrent_stream is, once local settings applied,
becomes NGHTTP2_INITIAL_MAX_CONCURRENT_STREAMS, which is very large
number. When adjusting number of streams, we have to take min of
local effective SETTINGS_MAX_CONCURRENT_STREAMS and pending one.
2014-05-16 22:32:08 +09:00
Tatsuhiro Tsujikawa
2778e4aafc
Remove useless debug code in nghttp2_stream_roots_add()
2014-05-16 22:30:59 +09:00
Tatsuhiro Tsujikawa
7b9a8acc22
Add HPACK deflation API
2014-05-13 23:42:55 +09:00
Tatsuhiro Tsujikawa
062d6a8398
Remove outdated comment
2014-05-12 22:58:05 +09:00
Tatsuhiro Tsujikawa
ad4a4ee567
Add missing library error code to nghttp2_error()
2014-05-12 22:58:04 +09:00
Tatsuhiro Tsujikawa
ab76468971
Return NGHTTP2_ERR_BUFFER_ERROR from nghttp2_hd_{deflate,inflate}_hd
...
It is generally useful to know what is the cause of the error. Since
we expose HPACK API, it is friendly to tell application the
insufficient buffer size is a culprit.
2014-05-12 22:58:04 +09:00