Tatsuhiro Tsujikawa
4f027c1562
libnghttp2: Remove dependency to zlib
...
We inherited gzip compression API from spdylay codebase. In spdylay,
the cost of having such API is almost free because spdylay requires
zlib for header compression. nghttp2 no longer uses gzip to header
compression. zlib dependency exists just for gzip compression API,
which is not an essential. So we decided to move gzip code to under
src and remove zlib dependency from libnghttp2 itself. As nghttp2
package, we depend on zlib to compile tools under src.
2014-05-06 23:10:50 +09:00
Tatsuhiro Tsujikawa
855f39743a
Fix crash when indexed repr index=0
2014-05-01 09:06:54 +09:00
Tatsuhiro Tsujikawa
660c536275
Extend namelen and valuelen in nghttp2_nv to size_t
2014-04-30 23:08:34 +09:00
Tatsuhiro Tsujikawa
d49733a5c9
Declare h2-12 for now
2014-04-25 01:33:29 +09:00
Tatsuhiro Tsujikawa
052be3296c
Implement compressed DATA
...
The library interface supports compressed DATA. The library does not
deflate nor inflate data payload. When sending data, an application
has to compress data and set NGHTTP2_DATA_FLAG_COMPRESSED to
data_flags parameter in nghttp2_data_source_read_callback. On
receiving, flags parameter in nghttp2_on_data_chunk_recv_callback
includes NGHTTP2_FLAG_COMPRESSED. An application should check the
flags and inflate data as necessary. Since compression context is per
frame, when DATA is seen in nghttp2_on_frame_recv_callback, an
application should reset compression context.
2014-04-25 01:27:18 +09:00
Tatsuhiro Tsujikawa
ee26469cd9
Handle circular dependency
...
Handle the situation if a stream is told to depend on its descendant.
This is what
http://tools.ietf.org/html/draft-ietf-httpbis-http2-12#section-5.3.3
says.
2014-04-24 23:44:34 +09:00
Tatsuhiro Tsujikawa
853c9888d9
Distribute effective weight among only streams with marked as top
...
If stream with dpri value of no_data, we check any its descendant has
stream with dpri value of top. If so, we have to distribute of its
portion of weight to its descendants.
2014-04-24 23:37:40 +09:00
Tatsuhiro Tsujikawa
1c1843297c
priority: Add tests
2014-04-17 21:34:44 +09:00
Tatsuhiro Tsujikawa
aa4d43f31e
Allow exclusive dependency to stream 0
2014-04-17 21:18:18 +09:00
Tatsuhiro Tsujikawa
ac86b51e37
Implement simplified dependency based priority
2014-04-15 22:55:07 +09:00
Tatsuhiro Tsujikawa
ece6521d26
Check stream availability when sending ALTSVC with stream_id != 0
2014-04-10 23:27:10 +09:00
Tatsuhiro Tsujikawa
9b3d5a8be5
Harden check for submit functions
...
nghttp2_submit_{headers,request}: Return NGHTTP2_ERR_INVAILD_ARGUMENT
if pri_spec->type is invalid.
nghttp2_submit_push_promise: Return NGHTTP2_ERR_PROTO if issued by
client.
nghttp2_submit_altsvc: Return NGHTTP2_ERR_PROTO instead of
NGHTTP2_ERR_INVALID_STATE if issued by client.
2014-04-09 00:13:11 +09:00
Tatsuhiro Tsujikawa
8f23c0c38b
Name unnamed union in nghttp2_priority_spec so that we can be C90 compatible
2014-04-05 18:40:44 +09:00
Tatsuhiro Tsujikawa
c1060f0d48
Announce h2-11
2014-04-05 18:26:48 +09:00
Tatsuhiro Tsujikawa
e7ad3633c7
nghttp2_data_source_read_callback: Replace eof with uint32_t *data_flags
...
Replace int *eof with uint32_t *data_flags so that we can easily
extend functionality if we have to (but we don't do if possible).
2014-04-05 17:59:24 +09:00
Tatsuhiro Tsujikawa
a0d93e7744
Fix unit test
2014-04-05 17:55:14 +09:00
Tatsuhiro Tsujikawa
1e38ceb1cd
Allow empty SETTINGS in upgrade
2014-04-04 20:23:46 +09:00
Tatsuhiro Tsujikawa
ac2a8ef4a2
Fix bug that transfer stuck when stream marked as top is deferred
2014-04-03 15:48:51 +09:00
Tatsuhiro Tsujikawa
ef40879b5f
Refactor nghttp2_stream
...
Combine deferred_data and data into data_item and merge deferred_flags
into flags.
2014-04-02 22:55:49 +09:00
Tatsuhiro Tsujikawa
2685e3405f
Rename NGHTTP2_DATA_PAYLOAD_LENGTH as NGHTTP2_DATA_PAYLOADLEN
2014-04-02 20:35:07 +09:00
Tatsuhiro Tsujikawa
9c4c99bf96
Adjust transmission frame buffer size to support maximum payload size
2014-04-02 20:33:01 +09:00
Tatsuhiro Tsujikawa
c9f90924a9
Add flags parameter to nghttp2_on_header_callback
2014-04-02 02:10:35 +09:00
Tatsuhiro Tsujikawa
b1722cbe28
Update static table
2014-04-02 01:30:50 +09:00
Tatsuhiro Tsujikawa
7877b676e3
Honor NGHTTP2_NV_FLAG_NO_INDEX in deflater and inflater
2014-04-02 01:25:44 +09:00
Tatsuhiro Tsujikawa
24cb90806d
Add flags to nghttp2_nv structure
...
This is preliminary change for upcoming HPACK updates. The flags are
used to determine the name/value pair is indexable or not.
2014-04-01 23:17:50 +09:00
Tatsuhiro Tsujikawa
f785e56dba
Implement ALTSVC frame
2014-04-01 21:47:51 +09:00
Tatsuhiro Tsujikawa
b85e2ab7f7
Share stream_group weight among streams marked as top
2014-03-31 22:51:33 +09:00
Tatsuhiro Tsujikawa
ab2dc5967d
Replace HTTP/2.0 with HTTP/2
2014-03-30 19:26:37 +09:00
Tatsuhiro Tsujikawa
21d5986157
Fail nghttp2_submit_settings if there is pending SETTINGS frame in-flight
...
pending_local_max_concurrent_stream is now set in
nghttp2_session_add_settings, rather than after frame was sent.
2014-03-30 18:07:52 +09:00
Tatsuhiro Tsujikawa
74daa16a1c
Retain incoming closed streams for dependency tree
...
The number of closed stream to keep is limited by
MAX_CONCURRENT_STREAMS - current active stream.
2014-03-30 17:41:54 +09:00
Tatsuhiro Tsujikawa
f7162ab702
Implement dependency based priority
2014-03-30 01:24:16 +09:00
Tatsuhiro Tsujikawa
e1eebf08fb
Support DEBUG_DATA in GOAWAY again
2014-03-22 18:59:59 +09:00
Tatsuhiro Tsujikawa
01586f473d
Wrap small inbound buffer by nghttp_buf
2014-03-22 18:27:38 +09:00
Tatsuhiro Tsujikawa
68b392817b
nghttp2_bufs: Add chunk_keep to specify the number of buffers to keep on reset
2014-03-16 21:38:13 +09:00
Tatsuhiro Tsujikawa
2ec4b10805
Add nghttp2_buf tests
2014-03-14 21:40:14 +09:00
Tatsuhiro Tsujikawa
b464cb78ac
Fix tests to reflect their intent
2014-03-14 00:25:43 +09:00
Tatsuhiro Tsujikawa
1be8d1b797
inflate_header_block: Issue RST_STREAM if header decompression failed
2014-03-13 23:02:33 +09:00
Tatsuhiro Tsujikawa
d07bb1ddff
Rework outbound frame buffers
2014-03-13 22:11:02 +09:00
Tatsuhiro Tsujikawa
0666a73e10
Remove nghttp2_buffer
2014-03-11 21:20:51 +09:00
Tatsuhiro Tsujikawa
74f899fc01
Replace NGHTTP2_MAX_FRAME_LENGTH with NGHTTP2_MAX_PAYLOADLEN
2014-03-11 02:01:08 +09:00
Tatsuhiro Tsujikawa
e803c6b65e
Replace NGHTTP2_FRAME_HEAD_LENGTH with NGHTTP2_FRAME_HDLEN
2014-03-11 01:55:42 +09:00
Tatsuhiro Tsujikawa
358b4386d3
Introduce nghttp2_buf to ease buffer management
2014-03-11 01:47:38 +09:00
Tatsuhiro Tsujikawa
54dab50015
Support END_SEGMENT in nghttp2_submit_data()
2014-03-06 00:19:02 +09:00
Tatsuhiro Tsujikawa
547d6d1fb5
Use 4086 as max DATA payload size to make DATA frame fit into 4K buffer
2014-03-05 22:48:17 +09:00
Tatsuhiro Tsujikawa
6f0b9128b4
tests: Fix leak
2014-02-28 03:07:19 +09:00
Tatsuhiro Tsujikawa
d1c1deaf03
Add promised_stream_user_data parameter to nghttp2_submit_push_promise
...
This is very useful to associate application specific data to promised
stream.
nghttp2_nv_array_copy now does not complain the header field is large.
2014-02-25 00:26:12 +09:00
Tatsuhiro Tsujikawa
fc25143418
Remove END_PUSH_PROMISE in favor of END_HEADERS
2014-02-21 21:23:51 +09:00
Tatsuhiro Tsujikawa
a21175398d
Add test to verify that deflater can handle initial buf smaller than default
2014-02-21 21:18:46 +09:00
Tatsuhiro Tsujikawa
3395f7158f
Strict handling of max concurrent streams
...
Exceeding ACKed max concurrent streams results in connection error.
This change fixes the bug that num_{incoming,outgoing}_streams
is decremented wrongly if a stream is in reserved state and
RST_STREAM is send and its state is changed to NGHTTP2_STREAM_CLOSING.
This change also fixes the bug that transmission of push response
HEADERS does not increase num_outgoing_streams.
2014-02-20 23:10:32 +09:00
Tatsuhiro Tsujikawa
2966ad2d15
Update doc
2014-02-19 00:16:25 +09:00