Commit Graph

4446 Commits

Author SHA1 Message Date
Sunpoet Po-Chuan Hsieh 90b5a5856b Fix build when OpenSSL 1.0.2 is not available 2015-12-04 17:38:04 +08:00
Tatsuhiro Tsujikawa a151a44caf Set max number of outgoing concurrent streams to 100 by default
Instead of using nonsensical large value for max outgoing concurrent
streams, use more sensible value, 100.
2015-12-03 23:45:03 +09:00
Tatsuhiro Tsujikawa 478a423bcf Reduce nghttp2_stream size 2015-12-03 22:53:02 +09:00
Tatsuhiro Tsujikawa 93d8636fb0 Keep incoming streams only at server side
We should only keep incoming closed streams because we only keep at
most max concurrent streams, which only applied to incoming streams.
2015-12-03 22:48:41 +09:00
Tatsuhiro Tsujikawa 2288ee8060 Create stream object for pushed resource during nghttp2_submit_push_promise()
Previously, stream object for pushed resource was not created during
nghttp2_submit_push_promise().  It was created just before
nghttp2_before_frame_send_callback was called for that PUSH_PROMISE
frame.  This means that application could not call
nghttp2_submit_response for the pushed resource before
nghttp2_before_frame_send_callback was called.  This could be solved
by callback chaining, but for web server with back pressure from
backend stream, it is a bit unnecessarily hard to use.

This commit changes nghttp2_submit_push_promise() behaviour so that
stream object is created during that call.  It makes application call
nghttp2_submit_response right after successful
nghttp2_submit_push_promise call.
2015-12-02 21:16:30 +09:00
Tatsuhiro Tsujikawa 6beaf4d9f3 h2load: Add req/s min, max, mean and sd for clients 2015-12-01 23:54:21 +09:00
Tatsuhiro Tsujikawa d1d1c83e56 h2load: Fix broken connection times 2015-12-01 22:29:30 +09:00
Tatsuhiro Tsujikawa cbad05e0de src: Fix compile error with gcc-4.7 2015-12-01 21:21:50 +09:00
Tatsuhiro Tsujikawa e01d213636 Update man pages 2015-11-29 19:12:53 +09:00
Tatsuhiro Tsujikawa e1e7840b2c doc: Fix broken layout in ascii art 2015-11-29 19:08:17 +09:00
Tatsuhiro Tsujikawa 2754d9e2bb Update doc 2015-11-28 15:24:13 +09:00
Tatsuhiro Tsujikawa 12b2e0a2b3 Add nghttp2_session_create_idle_stream() API
See GH-436
2015-11-28 15:23:44 +09:00
Tatsuhiro Tsujikawa aacac613af Assert dep_stream is non-null to shut up scan-build 2015-11-28 00:50:29 +09:00
Tatsuhiro Tsujikawa ba9e912cf6 src: Rename isAlpha, isDigit, and isHexDigit as is_... 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa d867fe64e3 src: Rename endsWith as ends_with 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa de247f7d33 src: Rename startsWith as starts_with 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa 1ba28bef1f util: Remove unused functions; rename regacy camel-case function names 2015-11-28 00:42:51 +09:00
Tatsuhiro Tsujikawa c0858d8c1a src: Minor optimization for appending single character 2015-11-28 00:03:16 +09:00
Tatsuhiro Tsujikawa 863493766d Fix in_attr_char(); cleanup const char array iteration 2015-11-27 23:54:07 +09:00
Tatsuhiro Tsujikawa a70445e122 Retain stream in reserved state on client side
Application may use it using nghttp2_stream_* functions, and traverse
its dependency.
2015-11-27 22:54:55 +09:00
Tatsuhiro Tsujikawa f23e34fa3c Handle response in nghttp2_on_begin_frame_callback
Previously, nghttp2_session_end_request_headers_received assumes
stream is still writable (in other words, local endpoint has not sent
END_STREAM).  But this assumption is false, because application can
send response in nghttp2_on_begin_frame_callback.  Probably, this
assumption was made before the callback was introduced.  This commit
addresses this issue.  Since all
nghttp2_session_end_*_headers_received functions are identical, we
refactored them into one function.
2015-11-27 22:50:13 +09:00
Tatsuhiro Tsujikawa 3d1d54e2ce Remove dead code 2015-11-27 21:13:44 +09:00
Tatsuhiro Tsujikawa c87a062dba Bump up version number to v1.5.0-DEV 2015-11-26 22:28:45 +09:00
Tatsuhiro Tsujikawa 0d52097213 Update bash_completion 2015-11-26 22:25:34 +09:00
Tatsuhiro Tsujikawa 6444f0c5cd Update man pages 2015-11-26 22:25:22 +09:00
Tatsuhiro Tsujikawa 1e74ee2d54 Bump up version number to 1.5.0, LT revision to 17:0:3 2015-11-26 22:21:58 +09:00
Tatsuhiro Tsujikawa ba9e96b829 h2load: Avoid copy of h1 request 2015-11-26 22:04:31 +09:00
Tatsuhiro Tsujikawa bd041bcbb0 h2load: Add --h1 option to force http/1.1 for both http and https URI 2015-11-26 21:33:27 +09:00
Tatsuhiro Tsujikawa 8e06e37375 h2load: Fix crash when dealing connection: close with HTTP/1.1 server 2015-11-26 21:26:00 +09:00
Tatsuhiro Tsujikawa faad041868 Use seq to break a tie for stream weight
Because of the nature of heap based priority queue, and our compare
function, streams with the same weight and same parent are handled in
the reverse order they pushed to the queue.  To allow stream pushed
earlier to be served first, secondary key "seq" is introduced to break
a tie.  "seq" is monotonically increased integer per parent stream,
and it is assigned to stream when it is pused to the queue, and gets
incremented.
2015-11-25 22:26:56 +09:00
Tatsuhiro Tsujikawa 3048bb9d90 Fix test: stream_id is not incremented 2015-11-25 22:18:54 +09:00
Tatsuhiro Tsujikawa 9088e4a16a Bump up version number to 1.5.0-DEV 2015-11-24 23:55:19 +09:00
Tatsuhiro Tsujikawa b08d5b1975 Explicitly treat stream_id 0 as error in nghttp2_session_change_stream_priority 2015-11-24 22:34:36 +09:00
Tatsuhiro Tsujikawa b53b1381b7 Fix bug that nghttp2_session_find_stream(session, 0) returned NULL
Previously, nghttp2_session_find_stream(session, 0) returned NULL
despite the fact that documentation said that it should return root
stream.  Now it is corrected, and it returns root stream as
documented.
2015-11-24 22:30:12 +09:00
Tatsuhiro Tsujikawa c44ee44cc3 nghttpd: Fix compile error due to incomplete FileEntry 2015-11-23 21:25:12 +09:00
Tatsuhiro Tsujikawa 8f970dec0e Update doc 2015-11-23 21:05:25 +09:00
Tatsuhiro Tsujikawa 2fee05242e Merge branch 'change-stream-priority' 2015-11-23 20:13:02 +09:00
Tatsuhiro Tsujikawa f0443d3398 Merge branch 'master' into change-stream-priority 2015-11-23 20:11:24 +09:00
Tatsuhiro Tsujikawa 5744acc2ca Merge branch 'shukitchan-master' 2015-11-23 20:06:04 +09:00
Tatsuhiro Tsujikawa 84e23bff10 h2load: clang-format 2015-11-23 20:05:40 +09:00
Tatsuhiro Tsujikawa d62bc26b62 Add test for nghttp2_session_change_stream_priority() 2015-11-23 19:48:51 +09:00
Kit Chan 718f7a5f7e h2load goes into infinite loop when timing script file starts with 0.0 in first line 2015-11-23 09:58:38 +00:00
Tatsuhiro Tsujikawa e95ad297ed travis: Enable integration tests and neverbleed
We added spdylay build since integration tests require it.
2015-11-23 16:15:31 +09:00
Tatsuhiro Tsujikawa dff2a19950 nghttpx: Don't send RST_STREAM to h2 backend if backend is disconnected state
This avoid establishing HTTP/2 backend connection again w/o pending
request.

See GH-431
2015-11-22 15:49:11 +09:00
Tatsuhiro Tsujikawa aa317c89ea Add API to change stream priority without sending PRIORITY frame
The added API is nghttp2_session_change_stream_priority().  This
provides the same functionality to re-prioritize stream when PRIORITY
frame.  is received, but we do it without PRIORITY frame.  This could
be useful for server to change pushed stream's priority silently.
2015-11-21 18:32:42 +09:00
Tatsuhiro Tsujikawa 72f2c4b272 Add nghttp2_session_check_server_session.rst to APIDOCS 2015-11-21 18:31:39 +09:00
Tatsuhiro Tsujikawa c7304317d4 nghttpd: Check validity of cached file descriptor periodically
This commit adds ability to check status of cached file descriptor to
make sure that it can be reused.  We inspect last modification time
and number of hard links.  If last modification is changed from the
last validation time, or number of hard links gets 0, we don't reuse
file descriptor.  We also capped upper limit of the cached file
descriptors.  If the limit is reached, we will close file descriptor
which is least recently used, and its usecount is 0.
2015-11-21 16:05:08 +09:00
Tatsuhiro Tsujikawa 3673b1303a python: Do the same thing in 8481bc6 with HEADERS + END_STREAM flag set 2015-11-21 15:44:12 +09:00
Tatsuhiro Tsujikawa b27b002a3f python: Use nghttp2_session_get_stream_remote_close 2015-11-21 15:40:05 +09:00
Tatsuhiro Tsujikawa 8481bc6e93 python: Send RST_STREAM if remote side is not closed and response finished 2015-11-21 15:09:06 +09:00