Tatsuhiro Tsujikawa
8f8c841df0
Merge branch 'master' into hpack-exp
2013-10-25 22:51:51 +09:00
Tatsuhiro Tsujikawa
896db5b24f
API change: Add flags parameter to all submit_* functions
...
The nghttp2_submit_{request,response} family do not get this change.
2013-10-25 22:50:24 +09:00
Tatsuhiro Tsujikawa
9e50ae46d9
nghttp_hd: Use NGHTTP2_HD_SIDE_{REQUEST,RESPONSE} instead of {CLIENT,SERVER}
...
This change conveys better notion about compression context.
2013-10-21 00:44:39 +09:00
Tatsuhiro Tsujikawa
0efa6e657f
Fix outbound flow control count
...
We wrongly added the whole payload length even if we sent part of it.
2013-10-18 19:43:59 +09:00
Tatsuhiro Tsujikawa
e85418f045
Fix local window size adjustments
...
Now shrinking local window size properly limits the amount of
WINDOW_UPDATE value so that shrinked window is honored.
2013-10-12 17:02:37 +09:00
Tatsuhiro Tsujikawa
2b9d4efa68
Refactor predicate_*_send functions
2013-10-04 22:42:34 +09:00
Tatsuhiro Tsujikawa
252c77f775
Return NGHTTP2_ERR_INVALID_STREAM_STATE for DATA, WINDOW_UPDATE to reserved
...
Use NGHTTP2_ERR_INVALID_STREAM_STATE when trying to send DATA or
WINDOW_UPDATE to reserved stream.
Also a bit refactored nghttp2_session_predicate_window_update_send
and nghttp2_session_predicate_data_send
2013-10-04 21:59:44 +09:00
Tatsuhiro Tsujikawa
bddb4de946
Fix data_stream_id and data_flags are not assigned
2013-10-03 22:51:58 +09:00
Tatsuhiro Tsujikawa
21d76dcc75
Add nghttp2_session_continue API function
...
The NGHTTP2_ERR_PAUSE library error code is introduced to pause
the execution of nghttp2_session_mem_recv() when that error code
is returned from nghttp2_on_frame_recv_callback or
nghttp2_on_data_chunk_recv_callback. If this happens, the parameters
available for both callbacks are retained until the application
calls nghttp2_session_continue(). The application must retain
input bytes which was used to produce the frame.
After successful call of nghttp2_session_continue, the application
can continue to call nghttp2_session_mem_recv() to process
additional data.
2013-09-28 17:59:24 +09:00
Tatsuhiro Tsujikawa
99ba622fed
Add NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS option
...
And utilize it in nghttp to limit initial max concurrent streams.
2013-09-14 19:41:49 +09:00
Tatsuhiro Tsujikawa
87abc8b951
nghttp2_session_on_window_update_received: Split into 2 functions
2013-09-05 23:21:00 +09:00
Tatsuhiro Tsujikawa
464f141593
Refactor deeply nested if blocks
2013-09-05 23:17:16 +09:00
Tatsuhiro Tsujikawa
a7bd4f33a3
Call on_stream_close_callback for stream in NGHTTP2_STREAM_INITIAL state
...
We call on_stream_close_callback even if stream->state is
NGHTTP2_STREAM_INITIAL. This will happen while sending request
HEADERS, a local endpoint receives RST_STREAM for that
stream. It may be PROTOCOL_ERROR, but without notifying stream
closure will hang the stream in a local endpoint.
2013-09-02 23:09:36 +09:00
Tatsuhiro Tsujikawa
59286adc5e
Add int return value to nghttp2_on_unknown_frame_recv_callback
2013-08-29 23:10:18 +09:00
Tatsuhiro Tsujikawa
db4f519500
Add int return value to nghttp2_on_frame_recv_parse_error_callback
2013-08-29 23:07:07 +09:00
Tatsuhiro Tsujikawa
053c444769
Add int return value to nghttp2_on_request_recv_callback
2013-08-29 23:03:21 +09:00
Tatsuhiro Tsujikawa
81653c1d1b
Add int return value to nghttp2_on_stream_close_callback
2013-08-29 22:58:05 +09:00
Tatsuhiro Tsujikawa
5a7f65f1f7
Add int return value to on_data_send_callback
2013-08-29 21:55:04 +09:00
Tatsuhiro Tsujikawa
b9d2f9b6b0
Add int return value to on_frame_not_send_callback
2013-08-29 21:51:58 +09:00
Tatsuhiro Tsujikawa
d4852b0f11
Add int return value to on_frame_send_callback
2013-08-29 21:48:34 +09:00
Tatsuhiro Tsujikawa
a51cdaacfc
Add int return value to nghttp2_before_frame_send_callback
2013-08-29 21:45:10 +09:00
Tatsuhiro Tsujikawa
544ac9f61f
Add int return value to nghttp2_on_data_recv_callback
2013-08-29 21:41:33 +09:00
Tatsuhiro Tsujikawa
972b47d6af
Add int return value to nghttp2_on_data_chunk_recv_callback
2013-08-29 21:39:32 +09:00
Tatsuhiro Tsujikawa
fb7d22fcb9
Add int return value to nghttp2_on_invalid_frame_recv_callback
2013-08-29 21:37:26 +09:00
Tatsuhiro Tsujikawa
a59cd3be82
Add int return value to nghttp2_on_frame_recv_callback
2013-08-29 21:33:52 +09:00
Tatsuhiro Tsujikawa
5c6ef84b97
Use COMPRESSION_ERROR if the cause of error comes from compressor
2013-08-28 23:32:37 +09:00
Tatsuhiro Tsujikawa
b37f99ca03
Connection error if payload size is strictly greater than (1 << 14) - 1
...
It would be desired to add option to make this limit configurable.
Fix scripted_recv_callback in tests.
2013-08-28 02:13:57 +09:00
Tatsuhiro Tsujikawa
2d41c99289
Connection error if header continuation is employed by peer for now
2013-08-24 19:28:57 +09:00
Tatsuhiro Tsujikawa
30d3ea7c93
Use old C style comment
2013-08-23 03:33:05 +09:00
Tatsuhiro Tsujikawa
35229b250f
Treat reception of DATA in reserved stream as connection error
2013-08-23 03:33:05 +09:00
Tatsuhiro Tsujikawa
618a1e0782
Update doc
2013-08-23 03:33:05 +09:00
Tatsuhiro Tsujikawa
e278efdf38
Strict handling of connection error
...
Following cases are now treated as connection error of type
PROTOCOL_ERROR.
* Receiving HEADERS from client in reserved (local)
* Receiving PUSH_PROMISE against peer-initiated stream
* Receiving WINDOW_UPDATE against in reserved (local, remote)
2013-08-23 03:33:05 +09:00
Tatsuhiro Tsujikawa
0c9703fa2c
Remove NGHTTP2_FLAG_END_FLOW_CONTROL
2013-08-23 03:33:05 +09:00
Tatsuhiro Tsujikawa
b1ae1c30d8
Allow duplicate settings ID in SETTINGS
...
If multiple same ID are found, use the last one.
2013-08-23 03:33:05 +09:00
Tatsuhiro Tsujikawa
407027452c
Update doc
2013-08-17 22:34:57 +09:00
Tatsuhiro Tsujikawa
3ee7ca2cdd
Handle non-fatal error from nghttp2_submit_data
2013-08-10 15:26:12 +09:00
Tatsuhiro Tsujikawa
a52ca391a2
Do not RST_STREAM for DATA against nonexistent stream
...
This may be useful to the misbehaving implementation, but it could
result in lots of RST_STREAM, so just ignore it for now.
2013-08-10 15:13:53 +09:00
Tatsuhiro Tsujikawa
80bacd0a54
Disable local flow control in nghttp2_submit_window_update()
2013-08-09 23:46:12 +09:00
Tatsuhiro Tsujikawa
1155606d5e
Rewrite re-prioritization with PRIORITY
2013-08-09 23:40:41 +09:00
Tatsuhiro Tsujikawa
0dec04921d
Remove priority adjustment for a DATA frame
...
Simply it does not work as expected.
2013-08-09 21:21:14 +09:00
Tatsuhiro Tsujikawa
a3ff4cb50b
Rename window_size member of nghttp2_session as remote_window_size
2013-08-09 01:31:15 +09:00
Tatsuhiro Tsujikawa
19377fb3cd
Allow disabling auto WINDOW_UPDATE for connection and stream individually
...
Now NGHTTP2_OPT_NO_AUTO_WINDOW_UPDATE is split into 2 options:
NGHTTP2_OPT_NO_AUTO_STREAM_WINDOW_UPDATE and
NGHTTP2_OPT_NO_AUTO_CONNECTION_WINDOW_UPDATE.
This is preparation for the upcoming removal of END_FLOW_CONTROL
flag. For nghttpx, instead of using END_FLOW_CONTROL to disable
connection-level flow control, increase window size by large
enough value, which is friendly way to current chromium
implementation.
2013-08-09 01:23:39 +09:00
Tatsuhiro Tsujikawa
b979d2e8d2
Support increment/reduction of local window size by WINDOW_UPDATE
2013-08-09 00:58:52 +09:00
Tatsuhiro Tsujikawa
e67096fef3
Handle overflow in initial window update in stream
...
Rename window_size in nghttp2_stream as remote_window_size.
2013-08-08 21:12:49 +09:00
Tatsuhiro Tsujikawa
dcfa421d6f
Fix connection-level flow control (local)
...
Fix the bug that connection-level local window is not updated
for the data is the last part of the stream. For the stream
level window may ignore this, connection-level window must
be updated. Also this change fixes the bug that connection-level
window is not updated for the ignored DATA frames.
2013-08-07 22:02:30 +09:00
Tatsuhiro Tsujikawa
737ac01d91
Add API for HTTP Upgrade
2013-08-03 18:05:14 +09:00
Tatsuhiro Tsujikawa
bd64619cf5
Fix segmentation fault
...
Fix segmentation fault if DATA frame is received for the stream
which is already closed.
2013-07-31 20:32:44 +09:00
Tatsuhiro Tsujikawa
8033152e80
Disable local flow control on FLOW_CONTROL_OPTIONS = 1
2013-07-28 19:05:51 +09:00
Tatsuhiro Tsujikawa
20173b5f61
NGHTTP2_SETTINGS_FLOW_CONTROL_OPTIONS: Check least significant bit only
2013-07-26 23:11:41 +09:00
Tatsuhiro Tsujikawa
9c54e63871
Remove bogus assert
2013-07-26 01:34:57 +09:00