Tatsuhiro Tsujikawa
7b3dade184
tests: Fix memory leak
2013-11-02 16:55:58 +09:00
Tatsuhiro Tsujikawa
4bc44b0c0b
Implement SETTINGS_ENABLE_PUSH
...
It is not clear that SETTINGS_ENABLE_PUSH = 0 disallows HEADERS
to the reserved streams. For now, we just check the reception
and transmission of PUSH_PROMISE against SETTINGS_ENABLE_PUSH.
2013-11-02 16:53:06 +09:00
Tatsuhiro Tsujikawa
ad64f11a95
Remove code submitting WINDOW_UPDATE with negative delta
...
It is effectively dead code because we should have already submit
WINDOW_UPDATE before this case happens.
2013-10-30 23:43:40 +09:00
Tatsuhiro Tsujikawa
2e7bc014e1
Return 0 if recv_window_size is negative; add tests
2013-10-30 01:58:38 +09:00
Tatsuhiro Tsujikawa
2dd44746a6
Merge branch 'master' into hpack-exp
2013-10-28 23:15:14 +09:00
Tatsuhiro Tsujikawa
a416891454
tests: Fix test error on 32-bit system
2013-10-28 22:00:49 +09:00
Tatsuhiro Tsujikawa
924c858c8f
tests: Add SETTINGS_HEADER_TABLE_SIZE test case
2013-10-28 01:08:09 +09:00
Tatsuhiro Tsujikawa
8c530f36cb
Include std lib headers before cunit header file
2013-10-27 23:20:44 +09:00
Tatsuhiro Tsujikawa
67ce60544e
Change maximum frame length to 16383
2013-10-27 21:17:09 +09:00
Tatsuhiro Tsujikawa
cfb9857f27
Use FRAME_SIZE_ERROR for invalid payload length
2013-10-27 20:55:44 +09:00
Tatsuhiro Tsujikawa
5ace898392
Update error code
2013-10-27 19:31:24 +09:00
Tatsuhiro Tsujikawa
a46ccdb144
Apply initiated SETTINGS changes on reception of ACK
2013-10-27 19:22:51 +09:00
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
4e4fab01b1
Merge branch 'master' into hpack-exp
...
Conflicts:
lib/nghttp2_hd.c
2013-10-18 20:06:36 +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
50cdcca911
Implement static Huffman for header compression
...
The current implementation uses Huffman code tables described
in http://tools.ietf.org/html/draft-rpeon-httpbis-header-compression-03
2013-10-15 23:55:12 +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
c5501dcb8d
tests: Test WINDOW_UPDATE is queued when certain amount of DATA is received
2013-10-04 21:42:02 +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
94263216fb
Add nghttp2_submit_request2
...
This function is similar to nghttp2_submit_request and the
difference is it takes an array of nghttp2_nv as name/value pairs.
It is useful if name/value pairs is not NULL-terminated in the
application code.
2013-09-11 00:55:35 +09:00
Daniel Stenberg
a1c3f89c72
nghttp2_pack_settings_payload: added a buffer size argument
...
To make it less likely that a user gets a buffer overflow if a
too small buffer is used.
2013-09-09 21:22:27 +09:00
Tatsuhiro Tsujikawa
a67d042a00
tests: Fix buffer overrun
2013-09-08 15:29:46 +09:00
Tatsuhiro Tsujikawa
d960cf8953
Add const to read-only nghttp2_frame* parameter in callbacks
2013-09-03 21:24:14 +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
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
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
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
82b9f78fc7
Check incoming header field name strictly
...
The validation rule is described in
http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-02#section-4.1.2
2013-08-25 17:39:29 +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
35229b250f
Treat reception of DATA in reserved stream as connection error
2013-08-23 03:33:05 +09:00
Tatsuhiro Tsujikawa
da384988cd
Add test for WINDOW_UPDATE against reserved
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
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
6ed8a8957b
Early termination if stream is not found
...
Add this check in nghttp2_submit_{priority, window_update, data,
push_promise}.
2013-08-10 00:02:24 +09:00
Tatsuhiro Tsujikawa
1155606d5e
Rewrite re-prioritization with PRIORITY
2013-08-09 23:40:41 +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
73563de8d4
Specify max length for header value and header block
...
The max length of header block is not used right now. It will
be used when header continuation is implemented.
2013-08-06 21:57:26 +09:00
Tatsuhiro Tsujikawa
737ac01d91
Add API for HTTP Upgrade
2013-08-03 18:05:14 +09:00
Tatsuhiro Tsujikawa
8033152e80
Disable local flow control on FLOW_CONTROL_OPTIONS = 1
2013-07-28 19:05:51 +09:00
Tatsuhiro Tsujikawa
608a493925
Change initial window size to 65535
2013-07-27 21:26:47 +09:00
Tatsuhiro Tsujikawa
ddd04e8ced
Fix header compression bug, and perform always incremental indexing
2013-07-27 00:58:38 +09:00
Tatsuhiro Tsujikawa
1056d8690e
Rename functions related to HEADERS
2013-07-25 21:07:38 +09:00
Tatsuhiro Tsujikawa
84cbebf4f7
Implement server push
2013-07-25 01:59:48 +09:00
Tatsuhiro Tsujikawa
b7ff05c4c6
Fail session if header compression failed on send
2013-07-23 22:47:15 +09:00
Tatsuhiro Tsujikawa
0bcf90d32d
Support PRIORITY frame send and receive
2013-07-23 00:28:00 +09:00
Tatsuhiro Tsujikawa
aa4df35a10
Remove NGHTTP2_OPT_MAX_RECV_CTRL_FRAME_BUFFER option
2013-07-20 00:24:25 +09:00
Tatsuhiro Tsujikawa
61bf7c6b02
Integrate new header compression
2013-07-20 00:08:14 +09:00
Tatsuhiro Tsujikawa
a3bdda68f8
End flow control by WINDOW_UPDATE
2013-07-16 21:30:36 +09:00
Tatsuhiro Tsujikawa
d54cfb88ff
Add connection-level flow control
2013-07-16 20:54:24 +09:00
Tatsuhiro Tsujikawa
1fdaa7e59a
Disable flow control entirely with FLOW_CONTROL_OPTIONS
2013-07-16 18:26:57 +09:00
Tatsuhiro Tsujikawa
24cab312cf
Make spdycat and spdyd barely work
2013-07-16 00:15:04 +09:00
Tatsuhiro Tsujikawa
48cb017245
Implement HTTP-draft-04/2.0
2013-07-15 21:45:59 +09:00
Tatsuhiro Tsujikawa
0edce70343
Rebranding nghttp2
2013-07-13 00:43:06 +09:00