Commit Graph

2257 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 9f6bb989e3 Merge branch 'akamai-window_size_control' 2014-08-25 21:15:38 +09:00
Tatsuhiro Tsujikawa 3655090997 Merge branch 'window_size_control' of https://github.com/akamai/nghttp2 into akamai-window_size_control 2014-08-25 21:09:26 +09:00
Scott Mitchell 3cd08251ca Send window size API extension
Motivation:

The send window size is currently fixed by a macro at compile time.
In order for users of the library to impact the send window size they
would have to change a macro at compile time. The window size may be dynamic
depending on the environment and deployment scheme. The library users
currently have no way to change this parameter.

Modifications:

Add a new optional callback method which is called before data is sent to
obtain the desired send window size. The callback return value will be
subject to a range check for the current session, stream, and settings
limits defined by flow control.

Result:
Library users have control over their send sizes.
2014-08-24 11:32:44 -04:00
Tatsuhiro Tsujikawa 1673ae2c99 src: Add 308 Permanent Redirect (RFC 7238) 2014-08-24 22:56:48 +09:00
Tatsuhiro Tsujikawa bf48ef9bab Add test to check consumed size when no auto window update is enabled 2014-08-24 22:36:35 +09:00
Tatsuhiro Tsujikawa 1093b3eeab Check explicitly that padding field is really read 2014-08-24 22:29:05 +09:00
Tatsuhiro Tsujikawa d5da7611fa nghttpx: Remove unused member function and variable 2014-08-24 22:27:10 +09:00
Tatsuhiro Tsujikawa 9893ae81af Add nghttp2_bufs_realloc 2014-08-24 15:34:55 +09:00
Tatsuhiro Tsujikawa 7bfa276e96 Fix bug that NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE causes session failure
Previously returning NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE from
on_header_callback moves input offset badly and it causes header
decompression error on the subsequent frames.  This commit fix this
bug.
2014-08-24 00:50:55 +09:00
Tatsuhiro Tsujikawa 02c5621c61 Refactor functions to update consumed size 2014-08-23 18:56:04 +09:00
Tatsuhiro Tsujikawa 9ad2c0887e nghttpx: Use _Exit() instead of exit() when execve is failed in child process 2014-08-23 18:15:47 +09:00
Tatsuhiro Tsujikawa 0c7e2fbec6 Use parenthesis explicitly for bit wise operation 2014-08-23 18:03:20 +09:00
Tatsuhiro Tsujikawa cfee9cab36 Avoid possible double-free and make nghttp2_buf{s}_free(NULL) success 2014-08-23 11:16:49 +09:00
Tatsuhiro Tsujikawa 679a0a0fa1 README.rst: Require spdylay >= 1.3.0 2014-08-21 22:50:19 +09:00
Tatsuhiro Tsujikawa d5dcbf6f3b nghttpx: Fix possible flow control issue
Previously we only update consumed flow control window when number of
bytes read in nghttp2 and spdylay callback is 0.  Now we notify
nghttp2 library the consumed bytes even if number of bytes read > 0.
This change also uses newly added spdylay_session_consume() API, so we
require spdylay >= 1.3.0.
2014-08-21 21:22:16 +09:00
Tatsuhiro Tsujikawa 69b9ce6b68 nghttpx: Fix possible deadlock due to exhaustion of send window 2014-08-20 01:39:07 +09:00
Tatsuhiro Tsujikawa c81e87bf37 nghttpx: Fix dereference after null check 2014-08-20 00:17:50 +09:00
Tatsuhiro Tsujikawa 97533c966d nghttpx: Fix gcc compiler warning 2014-08-20 00:09:18 +09:00
Tatsuhiro Tsujikawa d6b495f2a7 nghttpx: Returns 503 if downstream connect fail for https upstream 2014-08-19 23:41:53 +09:00
Tatsuhiro Tsujikawa c7e9fe8154 nghttpx: Implement connection blocker for HTTP/1 backend 2014-08-19 23:36:04 +09:00
Tatsuhiro Tsujikawa fb62a5ed4f nghttpx: Use pointer for worker_config 2014-08-19 22:29:44 +09:00
Tatsuhiro Tsujikawa 345121975a nghttpx: Handle socket creation error 2014-08-19 22:29:44 +09:00
Tatsuhiro Tsujikawa a5dfe24e49 nghttpx: Use std::unique_ptr for DownstreamConnection 2014-08-19 00:20:57 +09:00
Tatsuhiro Tsujikawa 273d9f4f7d nghttpx: Use std::unique_ptr for Downstream object 2014-08-19 00:20:56 +09:00
Tatsuhiro Tsujikawa 500c5eea56 nghttpx: Rename Http2Upstream::add_downstream as add_pending_downstream 2014-08-18 21:38:03 +09:00
Tatsuhiro Tsujikawa 83a39f5b49 nghttpx: Fix stream handling of upgraded request 2014-08-18 21:36:55 +09:00
Tatsuhiro Tsujikawa 2fb675f13c nghttpx: Open default log files for errors occurred while parsing options 2014-08-17 22:37:30 +09:00
Tatsuhiro Tsujikawa eebd1f5492 nghttpx: Add some more info about prohibition of --read-burst=0 2014-08-17 22:31:44 +09:00
Tatsuhiro Tsujikawa 00ead22395 Don't allow frame submission for pending new frame
This is partial revert of bbe4f5a3d1.
Only documentation is reverted.  Since we have 2 queues to handle
maximum concurrent streams, we are not ready to allow immediate frame
submission for pending new frames.
2014-08-17 21:26:56 +09:00
Tatsuhiro Tsujikawa 2b4bd57c7f doc: Add building-android-binary document 2014-08-17 19:15:19 +09:00
Tatsuhiro Tsujikawa 86dd1519b4 nghttpx: Android specific hack for special files for logging
Android lacks /dev/stderr, so directly use /proc/self/fd/2 as default
errorlog-file.  Android does not like O_APPEND for /proc/self/fd/1 and
/proc/self/fd/2, so omit the flag for these paths.
2014-08-17 19:01:51 +09:00
Tatsuhiro Tsujikawa a507fc80b6 Isolate std::future when NOTHREADS is defined and build without SOCK_{NONBLOCK, CLOEXEC} 2014-08-17 18:50:10 +09:00
Tatsuhiro Tsujikawa 69c3920a1a android-config: Disable libxml2 for user build, use long clang names 2014-08-17 18:49:21 +09:00
Tatsuhiro Tsujikawa bbe4f5a3d1 Allow frame submission immediately after nghttp2_submit_{request,headers,pp}
This commit makes handling of outgoing HEADERS and PUSH_PROMISE in the
same priority of other frames on the stream, so these frames are
processed in the order they are submitted.  This allows application to
submit frames to a stream returned by nghttp2_submit_{request,
headers, push_promise} immediately.  The only exception is
WINDOW_UPDATA frame, which requires nghttp2_stream object, which is
not created yet.
2014-08-17 17:31:43 +09:00
Tatsuhiro Tsujikawa 49a9ec2cb3 nghttpx: Use int for resonse_rst_stream_error_code_ 2014-08-17 16:36:02 +09:00
Tatsuhiro Tsujikawa 5d2390deba nghttpx: Bring per-connection rate limit back
--read-burst=0 still does not work.  But specifying n > 0 workarounds
this.
2014-08-17 16:17:10 +09:00
Tatsuhiro Tsujikawa 02c347fe6b Add text dealing license around contribution to COPYING 2014-08-17 15:10:57 +09:00
Tatsuhiro Tsujikawa 3c056973a1 nghttpx: Ignore SIGCHLD not to create zombie on SIGUSR2 if -D is used 2014-08-17 00:05:24 +09:00
Tatsuhiro Tsujikawa d17f35a488 Add Contribution section to README.rst 2014-08-16 23:23:52 +09:00
Tatsuhiro Tsujikawa 1b8ad61779 doc: Add note how to re-open log files in nghttpx 2014-08-16 23:00:35 +09:00
Tatsuhiro Tsujikawa ede801d099 doc: Update man pages 2014-08-16 22:54:15 +09:00
Tatsuhiro Tsujikawa 9649b2d346 doc: Fix typo 2014-08-16 22:53:12 +09:00
Tatsuhiro Tsujikawa 53e52194b5 Bump up version number to 0.6.0-DEV 2014-08-16 22:50:33 +09:00
Tatsuhiro Tsujikawa 0e8419ac37 nghttpx: Add backend-connections-per-frontend option
This option limits the number of backend connections per frontend.
This is meaningful for the combination of HTTP/2 and SPDY frontend and
HTTP/1 backend.
2014-08-16 22:24:17 +09:00
Tatsuhiro Tsujikawa da08ba5d50 nghttpx: Reset upstream timer on upgrade 2014-08-15 10:29:46 +09:00
Tatsuhiro Tsujikawa 30fa6d24d0 nghttpx: Rewirte server header field if configured as reverse proxy 2014-08-14 22:45:21 +09:00
Tatsuhiro Tsujikawa f776c50d43 nghttpx: Just record error code when RST_STREAM is received
libnghttp2 will call on_stream_close callback when RST_STREAM is
received.  So we can use on_stream_close callback to handle existing
stream, instead of on_frame_recv callback.
2014-08-14 12:48:30 +09:00
Tatsuhiro Tsujikawa 7b85f6c50d nghttpx: Store errno to a variable temporarly 2014-08-13 22:13:08 +09:00
Tatsuhiro Tsujikawa 21cbf417c8 nghttpx: Use SOCK_NONBLOCK and SOCK_CLOEXEC flag in socketpair to avoid race 2014-08-13 22:09:35 +09:00
Tatsuhiro Tsujikawa ca680c16e3 nghttpx: Chown file to effective user 2014-08-13 01:53:44 +09:00