Tatsuhiro Tsujikawa
210a5c4f01
nghttpx: Use copy instead of const reference of backend group
2016-08-04 23:11:45 +09:00
Tatsuhiro Tsujikawa
54f640f3e1
nghttpx: Update doc
2016-07-31 20:50:07 +09:00
Tatsuhiro Tsujikawa
e2906025c8
nghttpx: Don't exit from save_pid and set_alpn_prefs
2016-07-31 20:35:10 +09:00
Tatsuhiro Tsujikawa
9a8e9815c9
nghttpx: Cleanup
2016-07-31 20:26:03 +09:00
Tatsuhiro Tsujikawa
8c3e864989
nghttpx: Define ~Config for automatic clean up with std::unique_ptr
...
Now config global is backed with std::unique_ptr. configuration
swapping dance is now a bit cleaner, but YMMV.
2016-07-31 19:01:29 +09:00
Tatsuhiro Tsujikawa
22570b7260
nghttpx: Close fd when error occurred in reload operation
...
This commit also fixes the bug that old configuration is still used
for worker process. The another bug fix is that inherited, but not
used fd is not closed in worker process. That makes reloading next
configuration fail if it contains the address which are leaked into
worker process.
2016-07-31 18:47:03 +09:00
Tatsuhiro Tsujikawa
fb49182c29
nghttpx: Move original_argv, argv, argc, and cmdcfgs to StartupConfig
2016-07-31 16:34:55 +09:00
Tatsuhiro Tsujikawa
b9b648e0ed
nghttpx: Remove last_worker_pid from Config
...
The last_worker_pid is known by inspecting the last entry of
worker_processes.
2016-07-31 16:20:00 +09:00
Tatsuhiro Tsujikawa
494775a25d
nghttpx: Rename SignalServer with WorkerProcess
2016-07-31 16:16:23 +09:00
Tatsuhiro Tsujikawa
1214f9e23b
nghttpx: Reload configuration with SIGHUP
...
This commit implements configuration reloading with SIGHUP.
There are rough edges left:
* Rename SignalServer with more meaningful name, say, WorkerProcess.
* We should introduce global configuration object which is not
affected by configuration reloading. It should hold cmdcfgs, argc,
argv, and last worker PID.
* We should close the listener file descriptor when some operation was
failed after that.
2016-07-31 15:57:41 +09:00
Tatsuhiro Tsujikawa
a54cda22ab
nghttpx: Do creation of InheritedAddr in a dedicated function for reuse
2016-07-31 00:35:15 +09:00
Tatsuhiro Tsujikawa
af5b354685
nghttp: next_weight_idx is enough to be an local variable
2016-07-29 19:36:05 +09:00
Tatsuhiro Tsujikawa
3c1c2c4aad
nghttp: Allow multiple -p option
...
The N-th -p options sets N-th URI's weight. If the number of -p is
less than the number of URIs, the last -p value is repeated. If no -p
is set, use default weight, 16.
2016-07-27 05:10:27 +09:00
Tatsuhiro Tsujikawa
33153010c5
nghttpx: Retry memcached connection
...
Previously, we didn't retry request on connection failure. Sometimes
we hit the edge case where connection is about to lost just when we
write request. To avoid this situation, we now retry request to
failed attempt. We also add ConnectBlocker to MemcachedConnection not
to attempt to connect to memcached if connection could not be made
previously.
2016-07-08 23:41:53 +09:00
Tatsuhiro Tsujikawa
30f26a2b9d
nghttpx: Explicitly cast to uint32_t for hash calculation
2016-07-06 23:58:53 +09:00
Tatsuhiro Tsujikawa
2bbe4422d2
nghttpx: Use consistent hashing for client IP based session affinity
...
We use technique described in https://github.com/RJ/ketama
2016-07-06 23:31:10 +09:00
Tomasz Buchert
5d3535126e
Fix FTBFS on armel by explicitly including the <mutex> header.
2016-07-05 00:04:23 +09:00
Tatsuhiro Tsujikawa
fd7d3c57d7
nghttpx: Use faster version of power
...
In our use case, x and y is quite small, and there is no chance for
overflow, and y is always integer.
2016-06-27 22:42:28 +09:00
Tatsuhiro Tsujikawa
179561e4be
nghttpx: Cast to double to fix build with gcc 4.8 on Solaris 11
2016-06-27 22:33:25 +09:00
Tatsuhiro Tsujikawa
903e0077aa
nghttpx: Fix build error with libressl
2016-06-27 22:29:07 +09:00
Tatsuhiro Tsujikawa
6fd4dd99da
nghttpx: Update doc
2016-06-26 22:33:17 +09:00
Tatsuhiro Tsujikawa
65095c448d
nghttpx: Fix compile error with gcc -Werror=comment
2016-06-25 23:57:40 +09:00
Tatsuhiro Tsujikawa
76e188e368
nghttpx: Fix compile error with gcc
2016-06-25 23:57:26 +09:00
Tatsuhiro Tsujikawa
0613a16c11
nghttpx: Fix compile error without --with-mruby
2016-06-25 23:56:46 +09:00
Tatsuhiro Tsujikawa
aced5b3b6c
nghttpx: Fix memory leak from CertLookupTree
2016-06-25 23:47:22 +09:00
Tatsuhiro Tsujikawa
97d8bb16e6
nghttpx: Update doc
2016-06-25 23:37:29 +09:00
Tatsuhiro Tsujikawa
3e14f0d8a5
nghttpx: Fix compile error with openssl 1.0.1
...
openssl lacks SSL_CTX_get0_certificates().
2016-06-25 23:35:37 +09:00
Tatsuhiro Tsujikawa
f7c0d48152
nghttpx: Rewrite CertLookupTree using Router
2016-06-25 22:52:01 +09:00
Tatsuhiro Tsujikawa
2a4733857f
nghttpx: Reduce TTFB with large number of incoming connections
...
To reduce TTFB with large number of incoming connections, we now
intentionally accept one connection at a time, so that it does not
delay the TTFB of the existing connection. This is significant
especially for TLS connections.
2016-06-25 11:50:33 +09:00
Tatsuhiro Tsujikawa
3c1efeff55
nghttpx: Don't reset read timer on write in LiveCheck
2016-06-24 22:25:43 +09:00
Tatsuhiro Tsujikawa
532f801fbd
nghttpx: Don't reset read timer on write in memcached connection
2016-06-24 00:11:29 +09:00
Tatsuhiro Tsujikawa
cbced219ec
nghttpx: Rewrite read timer handling
...
For HTTP/2, read timer starts when there is no downstream, and timer
stops when there is at least one downstream. For HTTP/1, read timer
starts when request handling finished, and timer stops when request
handling starts.
2016-06-24 00:04:39 +09:00
Tatsuhiro Tsujikawa
66ca8272ca
nghttpx: Clean up neverbleed AF_UNIX socket
2016-06-23 23:04:47 +09:00
Tatsuhiro Tsujikawa
aa16412850
nghttpx: Add --backend-max-backoff option
2016-06-22 00:13:43 +09:00
Tatsuhiro Tsujikawa
e2bdf1d734
nghttpx: Enforce the fact that api and healthmon are mutually exclusive
2016-06-21 22:44:26 +09:00
Tatsuhiro Tsujikawa
123752a032
nghttpx: Handle error from push_upload_data and end_upload_data
...
We have to gracefully handle the case where response ends before
request body is fully received.
2016-06-17 22:32:15 +09:00
Tatsuhiro Tsujikawa
ec5e438a7c
nghttpx: Make backend fail with TLS handshake failure, including ALPN mismatch
2016-06-17 00:53:38 +09:00
Tatsuhiro Tsujikawa
c0b6b9a282
nghttpx: Use 16KiB buffer for reading to match TLS record size
2016-06-17 00:50:40 +09:00
Tatsuhiro Tsujikawa
fa8bccbae2
nghttpx: Move api enabled to APIConfig
2016-06-17 00:09:15 +09:00
Tatsuhiro Tsujikawa
56e7cd4be2
nghttpx: Add healthmon parameter to -f option to enable health monitor mode
2016-06-17 00:00:37 +09:00
Tatsuhiro Tsujikawa
af9662f971
nghttpx: Make API processing one of alternative mode
2016-06-16 23:30:35 +09:00
Tatsuhiro Tsujikawa
af4e262d47
nghttpx: Use AI_NUMERICSERV
2016-06-16 23:06:17 +09:00
Tatsuhiro Tsujikawa
96218a1078
nghttpx: Fast backend replacement on multi thread environment
2016-06-16 23:04:06 +09:00
Tatsuhiro Tsujikawa
50c9c3358a
nghttpx: Silence logging
2016-06-16 22:12:42 +09:00
Tatsuhiro Tsujikawa
6f025619de
nghttpx: Use dedicated worker for API processing
...
Some API processing is very slow (e.g., getaddrinfo). To avoid to
slow down regular request handling, if multi threaded configuration is
enabled, we allocate dedicated worker for API.
2016-06-16 21:22:36 +09:00
Tatsuhiro Tsujikawa
7e31340045
nghttpx: Receive reference of std::mt19937, not making a copy
2016-06-16 21:11:39 +09:00
Tatsuhiro Tsujikawa
cddb411495
nghttpx: Fix bug that backend never return to online
2016-06-16 00:57:26 +09:00
Tatsuhiro Tsujikawa
92572203e7
nghttpx: Fix stack buffer overflow with API call
2016-06-16 00:39:11 +09:00
Tatsuhiro Tsujikawa
d48d399fb3
nghttpx: Allow query in API endpoint
2016-06-13 22:11:26 +09:00
Tatsuhiro Tsujikawa
81bfb84b32
nghttpx: Rename backend/replace API as backendconfig
2016-06-13 21:17:53 +09:00
Tatsuhiro Tsujikawa
11bca9a98a
h2load: Document the behaviour when -d is used with HTTP/1.1 connection
2016-06-12 18:56:32 +09:00
Tatsuhiro Tsujikawa
2868370f9e
h2load: http1: Send header + body in one packet
2016-06-12 18:54:06 +09:00
Tatsuhiro Tsujikawa
9f6c947a87
h2load: Use memchunks
2016-06-12 18:50:52 +09:00
Tatsuhiro Tsujikawa
1a2dc1e822
h2load: Add content-length header field for HTTP/2 and SPDY as well
2016-06-12 17:52:47 +09:00
Tatsuhiro Tsujikawa
7469139dda
h2load: Implement HTTP/1 upload
...
h2load has supported uploading a file quite a while, but it turns out
that it worked with HTTP/2 and SPDY only. HTTP/1 with upload did not
work. This commit fixes this bug, and implement HTTP/1 upload. Due
to architectural limitation of h2load, when -d option is used, the
number of in-flight pipe-lined requests is set to 1.
2016-06-12 17:42:12 +09:00
Tatsuhiro Tsujikawa
c06e8c89ff
nghttpx: Use BlockAllocator in match_downstream_addr_group
2016-06-11 18:41:43 +09:00
Tatsuhiro Tsujikawa
a809da68a3
nghttpx: Aggregate router configuration into one struct
2016-06-11 18:25:38 +09:00
Tatsuhiro Tsujikawa
084206bace
nghttpx: Handle edge case wildcard pattern and add tests
...
Suppose the wildcard patterns follows:
- *.nghttp2.org/foo
- *.img.nghttp2.org/bar
Previously, s.img.nghttp2.org/foo does not match anything. Now it
matches first pattern.
2016-06-11 13:33:59 +09:00
Tatsuhiro Tsujikawa
288449b9bc
nghttpx: Rewrite wildcard router
2016-06-10 23:43:44 +09:00
Tatsuhiro Tsujikawa
38f4f50e93
nghttpx: Erase wildcard patterns with http2 proxy enabled
2016-06-09 23:32:27 +09:00
Tatsuhiro Tsujikawa
f9897f8ccd
nghttpx: Fix bugs and crash when affinity is enabled
2016-06-09 23:17:41 +09:00
Tatsuhiro Tsujikawa
143d0b69b7
nghttpx: Implement client IP based session affinity
2016-06-09 22:35:59 +09:00
Tatsuhiro Tsujikawa
ac97c122d4
nghttpx: Fix memory leak
2016-06-06 00:16:25 +09:00
Tatsuhiro Tsujikawa
3cd0b87685
nghttpx: Make API endpoint work with SPDY
2016-06-05 23:35:30 +09:00
Tatsuhiro Tsujikawa
2867f03861
nghttpx: Close TODO comments
2016-06-05 23:02:50 +09:00
Tatsuhiro Tsujikawa
708c99c052
nghttpx: Describe api parameter in --frontend option
2016-06-04 18:48:16 +09:00
Tatsuhiro Tsujikawa
d3495405d9
nghttpx: Change API endpoint URI
2016-06-04 18:37:37 +09:00
Tatsuhiro Tsujikawa
aad2a24a22
nghttpx: Use JSON for API resposne body
2016-06-04 18:18:07 +09:00
Tatsuhiro Tsujikawa
27fa9c3c12
nghttpx: Only allow POST and PUT for API request
2016-06-04 17:55:48 +09:00
Tatsuhiro Tsujikawa
92db6820d8
nghttpx: Close API request connection for 400 and 413 response
2016-06-04 17:43:48 +09:00
Tatsuhiro Tsujikawa
851cbd49f4
nghttpx: Only parse backend option for API request for now
2016-06-04 17:43:37 +09:00
Tatsuhiro Tsujikawa
8288f5713b
nghttpx: Add --api-max-request-body option to set maximum API request body size
2016-06-04 17:24:54 +09:00
Tatsuhiro Tsujikawa
951ef0c6d5
nghttpx: Fix typo
2016-06-04 17:23:47 +09:00
Tatsuhiro Tsujikawa
9653ae98a6
nghttpx: Send 100-continue for API request
2016-06-04 17:23:21 +09:00
Tatsuhiro Tsujikawa
d837887af6
nghttpx: Avoid copy
2016-06-04 16:23:50 +09:00
Tatsuhiro Tsujikawa
2a504224de
nghttpx: Rename BlockAllocator::destroy as BlockAllocator::reset
2016-06-04 16:23:31 +09:00
Tatsuhiro Tsujikawa
d0bf247419
nghttpx: Refactor graceful shutdown in Http2Upstream
...
Instead of using bool flag, just stop prepare watcher.
2016-06-04 12:43:17 +09:00
Tatsuhiro Tsujikawa
9237d30e34
nghttpx: Remove flow_control_ from Http2Session
...
This is a legacy of SPDY era where it can disable flow control.
2016-06-04 12:38:39 +09:00
Tatsuhiro Tsujikawa
ef3fa23b2e
nghttpx: Send GOAWAY for retired h2 backend connection
2016-06-04 12:36:22 +09:00
Tatsuhiro Tsujikawa
cb7269f334
nghttpx: Close and disallow h1 backend connection on backend replacement
2016-06-04 12:16:31 +09:00
Tatsuhiro Tsujikawa
0ca7c4cb38
nghttpx: Send notice to replace downstream via ConnectionHandler
2016-06-04 01:02:57 +09:00
Tatsuhiro Tsujikawa
43913838b4
nghttpx: Retain memory in Router
2016-06-03 23:52:44 +09:00
Tatsuhiro Tsujikawa
845aa7a710
nghttpx: Share downstream config object
...
This is the unit of sharing configurations to change
2016-06-03 19:57:43 +09:00
Tatsuhiro Tsujikawa
fe58614b23
nghttpx: Use std::shared_ptr for downstream addresses so that we can swap them
2016-06-03 01:20:49 +09:00
Tatsuhiro Tsujikawa
2fd095d036
nghttpx: Share the code to configure backends
2016-06-03 00:22:55 +09:00
Tatsuhiro Tsujikawa
09150a7927
nghttpx: Pass pointer to Config object to store parsed configurations
2016-06-02 23:59:59 +09:00
Tatsuhiro Tsujikawa
667c8b0e27
nghttpx: Add APIDownstreamConnection to handle API request
...
For those connections via frontend with api parameter, they use solely
APIDownstreamConnection.
In this commit, APIDownstreamConnection just consumes all request
body, and do nothing. The next few commits implements our first API
endpoint: /v1/api/dynamicconfig.
2016-06-02 23:50:56 +09:00
Tatsuhiro Tsujikawa
2a0d0e798b
nghttpx: Add api parameter to --frontend option to mark API endpoint
2016-06-02 23:50:00 +09:00
Tatsuhiro Tsujikawa
3753b47475
src: Fix compiler warnings
2016-05-31 21:26:21 +09:00
Tatsuhiro Tsujikawa
e4dc6cf432
src: Use nghttp2_session_set_local_window_size()
2016-05-29 23:34:38 +09:00
Tatsuhiro Tsujikawa
f68dc02d6b
nghttpx: Remove unused private field from Connection object
2016-05-28 22:46:56 +09:00
Tatsuhiro Tsujikawa
2ca3bf7a7e
nghttpx: Fix bug that timeout on h1 backend makes that backend unavailable
2016-05-28 22:41:24 +09:00
Tatsuhiro Tsujikawa
43b045e84c
nghttpx: Fix compile error with gcc
2016-05-28 19:50:36 +09:00
Tatsuhiro Tsujikawa
852a320586
nghttpx: Cleanup code where request content-length is involved
2016-05-28 16:44:04 +09:00
Tatsuhiro Tsujikawa
81b3e3811b
nghttpx: Fix bug that 503 is returned if backend proto is not mixed
2016-05-26 04:49:36 +00:00
Tatsuhiro Tsujikawa
26eb983cf0
nghttpx: Fix bug that h2 is used while there is no h2 backend
2016-05-26 00:14:11 +09:00
Tatsuhiro Tsujikawa
e0491c2ee8
nghttpx: Refactor protocol selection in backend
2016-05-25 23:07:04 +09:00
Tatsuhiro Tsujikawa
2a4bf9f615
nghttpx: Allow mixed protocol and TLS settings among backends under same pattern
2016-05-24 23:36:43 +09:00
Tatsuhiro Tsujikawa
45f7c17932
nghttpx: Make backend fail if connect attempt is timed out
2016-05-24 21:59:24 +09:00
Tatsuhiro Tsujikawa
f2a1fadda9
nghttpx: Make backend fail if connect operation was timed out
2016-05-24 21:24:30 +09:00
Tatsuhiro Tsujikawa
98396f00ff
nghttpx: Cleane up bit more of save_pid()
2016-05-24 01:32:11 +09:00
Tatsuhiro Tsujikawa
e7d5cfff30
nghttpx: Fix crash introduced in the previous commit
2016-05-24 00:10:53 +09:00
Tatsuhiro Tsujikawa
c308be39de
nghttpx: Write PID in temporary file then rename
...
Write PID in temporary file first. Then rename it as the real
destination. It will avoid the issue that the external process may
read the empty PID file because of race condition.
2016-05-23 22:39:38 +09:00
Tatsuhiro Tsujikawa
65135bc319
nghttpx: Check null just in case
2016-05-22 21:57:24 +09:00
Tatsuhiro Tsujikawa
0fca352114
nghttpx: Make SETTINGS timeout value configurable
...
SETTINGS timeout can be configurable using
--frontend-http2-settings-timeout and
--backend-http2-settings-timeout.
2016-05-21 14:13:57 +09:00
Tatsuhiro Tsujikawa
9a3461e2b6
nghttpx: Use ev_timer_start intead of ev_timer_again for settings_timer_
...
Since we only use it once, we don't have to use ev_timer_again, and
stop timer manually.
2016-05-21 13:48:41 +09:00
Tatsuhiro Tsujikawa
0b9ee38db6
nghttpx: Handle corner case where session is going down just after ACK recved
2016-05-21 13:44:53 +09:00
Tatsuhiro Tsujikawa
a224aba577
nghttpx: No need to check activeness of SETTINGS ACK timer
...
We don't have to check activeness of SETTINGS ACK timer since we only
send SETTINGS frame without ACK only once per session at the moment.
2016-05-21 13:18:22 +09:00
Tatsuhiro Tsujikawa
9f770fec36
nghttpx: Save PID file after it is ready to accept connections
2016-05-21 10:42:09 +09:00
Tatsuhiro Tsujikawa
e6dfd4ff27
nghttpx: Call downstream_failure rather than on_failure in HTTP/1 backend
2016-05-21 10:34:47 +09:00
Tatsuhiro Tsujikawa
e99f3c58f7
nghttpx: Call downstream_failure where it should be
...
Also, we say connection succeeded only when we got SETTINGS ACK from
peer, rather than when we just connected to the peer in TCP or TLS.
2016-05-21 10:30:09 +09:00
Tatsuhiro Tsujikawa
2a3b6c11eb
nghttpx: Don't restart SETTINGS timer, and fix log message in HTTP/2 frontend
2016-05-21 10:29:11 +09:00
Tatsuhiro Tsujikawa
e26d6a2b27
nghttpx: Don't re-enter offline if it is already in offline mode
2016-05-21 10:28:16 +09:00
Tatsuhiro Tsujikawa
dce7288658
nghttpx: Wait for SETTINGS ACK to make sure that backend h2 server is alive
2016-05-21 00:30:54 +09:00
Tatsuhiro Tsujikawa
d1968c4465
nghttpx: Treat backend failure if SETTINGS is not received within timeout
2016-05-19 23:12:34 +09:00
Tatsuhiro Tsujikawa
629f1e6f0f
nghttpx: Add connection: close to mruby response in graceful shutdown period
2016-05-18 01:21:23 +09:00
Tatsuhiro Tsujikawa
7a3c656adf
nghttpx: Refactor
2016-05-15 21:05:20 +09:00
Tatsuhiro Tsujikawa
796160cb77
nghttpx: Don't add chunked encoded response body for HEAD request
2016-05-14 17:47:58 +09:00
Tatsuhiro Tsujikawa
5c82a36072
nghttpd: Set content-length in status response
2016-05-14 17:29:50 +09:00
Tatsuhiro Tsujikawa
b011012d8f
nghttpx: Use NGHTTP2_DATA_FLAG_NO_COPY for backend HTTP/2 session
2016-05-14 17:17:27 +09:00
Tatsuhiro Tsujikawa
8026bdd45a
nghttpx: Don't keep backend connection if request buffer is not empty
2016-05-14 17:16:50 +09:00
Tatsuhiro Tsujikawa
de3f2951b3
h2load: Robust error handling in POST data
2016-05-14 00:40:35 +09:00
Tatsuhiro Tsujikawa
d00788ceeb
nghttp: More robust error handling while reading file
2016-05-14 00:23:44 +09:00
Tatsuhiro Tsujikawa
e0df95a1d8
nghttp: Eliminate zero length DATA frame at the end if possible
2016-05-14 00:18:22 +09:00
Tatsuhiro Tsujikawa
6d22898936
src: Compile with OpenSSL 1.1.0-pre5
...
* don't use CRYPTO_LOCK stuff (they are sorted out by openssl, and no
application intervention is required, just like boringSSL)
* don't use OPENSSL_config
* use provided API to access BIO member
2016-05-07 16:18:58 +09:00
Tatsuhiro Tsujikawa
15a9dfbaea
nghttpd: Enable kqueue if it is available on the running platform
2016-05-06 23:45:56 +09:00
Tatsuhiro Tsujikawa
c6facaf662
h2load: Enable kqueue if it is available in the running platform
2016-05-06 23:40:55 +09:00
Tatsuhiro Tsujikawa
60e443b90b
h2load: Fix crash on exit on FreeBSD
2016-05-06 23:38:15 +09:00
Tatsuhiro Tsujikawa
d39335829d
nghttpx: Enable kqueue by default
...
We enabled libev kqueue backend in nghttpx by default. Since it might
not work on some platforms, we also added --no-kqueue option to
disable it.
2016-05-06 23:10:09 +09:00
Tatsuhiro Tsujikawa
752b5b3d44
nghttpx: Just call execv instead of execve
2016-05-05 23:08:42 +09:00
Tatsuhiro Tsujikawa
70e8dc3761
ngttpx: Pass environ to execve
2016-05-02 23:39:14 +09:00
Tatsuhiro Tsujikawa
3712c89a66
nghttpx: Use parameter instead of keyword for consistency
2016-04-29 22:47:49 +09:00
Tatsuhiro Tsujikawa
fd801864e3
nghttpx: Add sni keyword to --backend option
...
The --backend-tls-sni-field is deprecated in favor of sni keyword.
--backend-tls-sni-field still works, and it overrides all sni keyword
in --backend option. But it will be removed in the future release.
2016-04-29 14:42:18 +09:00
Tatsuhiro Tsujikawa
99f7e7e2a5
nghttpx: Add mruby env.server_addr and env.tls_used attributes
2016-04-29 12:17:25 +09:00
Tatsuhiro Tsujikawa
6c999e6fb5
nghttpx: Enable TLS session cache again in memcached connection
2016-04-28 22:57:34 +09:00
Tatsuhiro Tsujikawa
4aa4fe56e1
nghttpx: Destroy SSL object, and always lookup TLS session cache
2016-04-28 22:25:55 +09:00
Tatsuhiro Tsujikawa
09b97a3313
nghttpx: Add mruby env.server_port to return frontend server side port
2016-04-28 00:19:30 +09:00
Tatsuhiro Tsujikawa
d2f4e4e325
nghttpx: Always expect response trailer fields
2016-04-27 23:00:36 +09:00
Tatsuhiro Tsujikawa
2d2b72d4eb
nghttpx: Don't add 0-length DATA when response HEADERS bears END_STREAM flag
2016-04-27 21:19:28 +09:00
Tatsuhiro Tsujikawa
b39ad3135d
nghttpx: Don't use CN if we have dNSName or iPAddress field
2016-04-26 22:32:55 +09:00
Tatsuhiro Tsujikawa
f939000ad9
Update man pages
2016-04-25 21:58:37 +09:00
Brian Suh
5487b64fa6
nghttpx: Fix downstream connect callback called early
2016-04-24 20:49:38 -07:00
Tatsuhiro Tsujikawa
3d00dd6537
nghttpx: Fix erroneous division by sizeof(...)
2016-04-24 17:42:24 +09:00
Tatsuhiro Tsujikawa
b0e98718f5
src: Handle return value of getsockopt
2016-04-24 00:42:11 +09:00
Tatsuhiro Tsujikawa
86777defa8
nghttpx: Workaround for some older gcc4.9
2016-04-23 18:20:50 +09:00
Tatsuhiro Tsujikawa
68059ccda9
nghttp: Use nghttp2_session_mem_recv
2016-04-21 23:30:35 +09:00
Tatsuhiro Tsujikawa
bc2b941866
nghttpx: Wildcard match for CN
2016-04-21 22:53:07 +09:00
Tatsuhiro Tsujikawa
9b81eec944
nghttpx: Remove trailing "." from SAN DNS name and CN
2016-04-21 22:44:26 +09:00
Tatsuhiro Tsujikawa
00bf701600
nghttpx: Truncate too long -b option signature
2016-04-18 23:45:33 +09:00
Tatsuhiro Tsujikawa
5339c1774c
nghttpx: Log when backend group is shared
2016-04-16 22:04:35 +09:00
Tatsuhiro Tsujikawa
6f52da834b
nghttpx: Fix bug that server push from mruby script did not work
2016-04-16 18:52:14 +09:00
Tatsuhiro Tsujikawa
81f81e6b70
nghttpx: Error handling without assert
2016-04-13 19:22:32 +09:00
Tatsuhiro Tsujikawa
a16daf109b
nghttpx: Try next HTTP/1 backend address when connection cannot be made
2016-04-13 00:38:21 +09:00
Tatsuhiro Tsujikawa
b6708a4b87
nghttpx: Retry next HTTP/2 backend address when connection cannot be made
2016-04-13 00:38:08 +09:00
Tatsuhiro Tsujikawa
a14cea6363
nghttpx: Enable link header field based push for non-final response
2016-04-10 18:58:54 +09:00
Tatsuhiro Tsujikawa
9e64d10223
nghttpx: Move fall/rise configuration to --backend option
...
This commit removes --backend-fall and --backend-rise options. The
these configurations are now set as fall and rise parameters in
--backend option.
2016-04-09 21:58:08 +09:00
Tatsuhiro Tsujikawa
795ee8c20f
altsvc: Receive ALTSVC frame
2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
9b4089c244
src: Log ALTSVC
2016-04-08 23:25:56 +09:00
Tatsuhiro Tsujikawa
4a6fc6cede
src: Add missing source file to CMakeLists.txt
2016-04-08 23:19:54 +09:00
Tatsuhiro Tsujikawa
a803be9171
nghttpx: Check negotiated ALPN in LiveCheck
2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
ece3654139
nghttpx: Remove unused function declaration
2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
bf5392dafe
nghttpx: Use exponential backoff between failed connection attempts in LiveCheck
2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
7bc35044c7
nghttpx: Add --backend-fall and --backend-rise options
...
These options are analogous to fall and rise parameter found in
haproxy.
2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
f9b872ab78
nghttpx: Detect online/offline state of backend servers
2016-04-08 23:07:17 +09:00
Tatsuhiro Tsujikawa
ffddefc177
nghttpx: Refactor handling of negotiated ALPN
2016-04-08 23:06:37 +09:00
Tatsuhiro Tsujikawa
2a59c832c1
nghttpx: Set 0 to next_proto_len explicitly for clarification
2016-04-08 23:03:42 +09:00
Tatsuhiro Tsujikawa
ea5f424dec
nghttpx: Use gRPC's exponential backoff algorithm
2016-04-05 22:31:27 +09:00
Tatsuhiro Tsujikawa
46514074a4
nghttpx: Better load balancing between backend HTTP/2 servers
2016-04-03 15:09:01 +09:00
Tatsuhiro Tsujikawa
b1662a31f4
nghttpx: Fix crash with backend failure
2016-04-03 00:23:44 +09:00
Tatsuhiro Tsujikawa
344541dd89
nghttpx: Better distribute load to backend h2 servers
2016-04-02 00:02:48 +09:00
Tatsuhiro Tsujikawa
c17b3b8517
clang-format
2016-03-31 20:06:14 +09:00
Tatsuhiro Tsujikawa
2b22ec42c7
Merge branch 'dev/expect-continue' of https://github.com/jchampio/nghttp2 into jchampio-dev/expect-continue
2016-03-31 20:00:27 +09:00
Jacob Champion
dfdeeb3815
nghttp: only stop ContinueTimers if they exist
...
Fix a crash on disconnect if --expect-continue isn't actually in use.
2016-03-29 16:02:10 -07:00
Jacob Champion
4bed7854b5
nghttp: move ownership of ContinueTimer to Request
...
Each Request now owns its own (optional) ContinueTimer for
Expect/Continue handshakes. This removes the need for
shared_ptr/weak_ptr logic.
2016-03-29 13:11:27 -07:00
Jacob Champion
aa64e7ad3c
nghttp: stop ContinueTimers on response or reset
...
If the stream itself is reset, or the server sends a final response
immediately, any Expect/Continue handshake should be cancelled.
2016-03-29 12:41:28 -07:00
Tatsuhiro Tsujikawa
e30edb096a
clang-format
2016-03-29 22:11:42 +09:00
Tatsuhiro Tsujikawa
cdb466956d
nghttpx: One more fix for usage help
2016-03-29 22:10:30 +09:00
Jianqing Wang
199600af73
Fix error messages on deprecated mode
2016-03-29 12:09:52 +08:00
Jacob Champion
edb874e659
nghttp: move ContinueTimer start to on_frame_send
...
The ContinueTimer could expire before the full HEADERS frame was
actually sent. By moving the call to timer->start() to the
on_frame_send_callback(), this race is fixed.
2016-03-28 15:24:20 -07:00
Tatsuhiro Tsujikawa
fe0843be88
nghttpx: Fix bug that logger wrote string which was not NULL-terminated
2016-03-28 22:22:26 +09:00
Tatsuhiro Tsujikawa
ff07018720
nghttpx: Fix bug that proxy with HTTP/1.1 CONNECT did not work
...
This was a regression in 5fbe4cc225
.
2016-03-28 22:05:38 +09:00
Tatsuhiro Tsujikawa
757bcf1310
nghttpx: Fix bug that backend tls keyword did not work with -s option
2016-03-27 17:11:44 +09:00
Tatsuhiro Tsujikawa
c9aba4ea0c
nghttpx: Don't use data_prd.source.ptr
2016-03-27 16:57:43 +09:00
Tatsuhiro Tsujikawa
2cee80acf0
nghttpx: Fix handing stream after connection check was failed
2016-03-27 15:53:26 +09:00
Tatsuhiro Tsujikawa
d9a2ff278c
src: Use len instead of n for clarity
2016-03-27 15:52:24 +09:00
Tatsuhiro Tsujikawa
ad8be7d474
src: parse_link_header takes StringRef
2016-03-25 23:51:42 +09:00
Tatsuhiro Tsujikawa
07926cffca
src: Remove lookup_method_token(const std::string&)
2016-03-25 23:31:46 +09:00
Tatsuhiro Tsujikawa
00b2d7d513
src: Remove lookup_token(const std::string&)
2016-03-25 23:29:16 +09:00
Tatsuhiro Tsujikawa
f74d7ea119
src: Don't allow const char * in starts_with
2016-03-25 23:20:48 +09:00
Tatsuhiro Tsujikawa
2bca6360b6
src: Don't allow const char * in istarts_with and istarts_with_l
2016-03-25 23:18:31 +09:00
Tatsuhiro Tsujikawa
841b3c87db
src: Don't allow const char * in ends_with and ends_with_l
2016-03-25 23:04:44 +09:00
Tatsuhiro Tsujikawa
2ab79f4938
src: Don't allow const char * in iends_with and iends_with_l
2016-03-25 23:00:34 +09:00
Tatsuhiro Tsujikawa
2182a85875
src: Make strifind functin template
2016-03-25 22:56:23 +09:00
Tatsuhiro Tsujikawa
72d8d78d36
src: Don't allow const char * in 2nd argument of streq_l(S[N], T)
2016-03-25 22:53:31 +09:00
Tatsuhiro Tsujikawa
dad61d032e
src: Don't allow const char * in 2nd argument of strieq_l(S[N], T)
2016-03-25 22:51:20 +09:00
Tatsuhiro Tsujikawa
1bbb241baa
src: Make streq(T, S) function template
2016-03-25 22:48:13 +09:00
Tatsuhiro Tsujikawa
3e6c38e3be
src: Made strieq(T, S) template
2016-03-25 22:45:33 +09:00
Tatsuhiro Tsujikawa
9272e80fa6
nghttpx: Fix compile error on travis
2016-03-25 02:28:10 +09:00
Tatsuhiro Tsujikawa
44af3dab50
nghttpx: Update doc
2016-03-25 02:14:39 +09:00
Tatsuhiro Tsujikawa
22128767e6
nghttpx: Fix formatting issue on manual page
2016-03-25 02:08:25 +09:00
Tatsuhiro Tsujikawa
a46c815e4e
src: StringRef-fy
2016-03-25 01:41:06 +09:00
Tatsuhiro Tsujikawa
186d440168
nghttpx: More StringRef-fy
2016-03-25 01:19:42 +09:00
Tatsuhiro Tsujikawa
a9e365ad7d
fixup! nghttpx: More StringRef-fy
2016-03-25 01:10:48 +09:00
Tatsuhiro Tsujikawa
a104d8a80b
fixup! nghttpx: Use StringRef for SHRPX_UNIX_PATH_PREFIX
2016-03-25 01:10:25 +09:00
Tatsuhiro Tsujikawa
a5029d1eed
nghttpx: More StringRef-fy
2016-03-25 01:07:22 +09:00
Tatsuhiro Tsujikawa
848e45e333
nghttpx: Use StringRef for SHRPX_UNIX_PATH_PREFIX
2016-03-25 01:00:04 +09:00
Tatsuhiro Tsujikawa
79968c6374
src: Rewrite strifind
2016-03-25 00:27:59 +09:00
Tatsuhiro Tsujikawa
1699aef609
src: Remove strcompare
2016-03-25 00:16:25 +09:00
Tatsuhiro Tsujikawa
2d2d6c3cc0
src: Remove istarts_with(const char*) overload
2016-03-25 00:14:12 +09:00
Tatsuhiro Tsujikawa
bfccab9b9f
src: Remove starts_with(const char*, const char*) overload
2016-03-25 00:09:53 +09:00
Tatsuhiro Tsujikawa
17ccbae084
src: Don't compare against c-string
2016-03-25 00:07:21 +09:00
Tatsuhiro Tsujikawa
0875e66aab
src: Remove streq(const char *) overload
2016-03-25 00:02:07 +09:00
Tatsuhiro Tsujikawa
4dfae3484f
nghttpx: Refactor CertLookupTree interface
2016-03-24 23:35:15 +09:00
Tatsuhiro Tsujikawa
372123c178
nghttpx: Remove strieq(const char*, cosnt char*) overload, and fix unittests
2016-03-24 23:34:56 +09:00
Tatsuhiro Tsujikawa
13596bde90
nghttpx: Refactor option handling using StringRef
2016-03-24 22:15:58 +09:00
Jacob Champion
3b7b6a660e
nghttp: prevent ContinueTimer double-invocation
...
If a 100 Continue interim response was received after the continue
timeout was reached, dispatch_continue() would force a double submission
of DATA frames. This patch prevents dispatch_continue() from doing
anything if the timer callback has already been invoked. This makes
ContinueTimer a single-shot mechanism, as originally intended.
2016-03-23 09:09:13 -07:00
Tatsuhiro Tsujikawa
daa1ae3a45
nghttpx: Cosmetic change
2016-03-24 00:38:10 +09:00
Tatsuhiro Tsujikawa
44ee67ff71
nghttpx: Refactor split_host_port
2016-03-24 00:35:13 +09:00
Tatsuhiro Tsujikawa
144ae3af9d
nghttpx: Memcached connection encryption with tls keyword
...
Like frontend and backend options, encryption for memcached
connections is configured using tls keyword in
tls-session-cache-memcached and tls-ticket-key-memcached options.
tls-session-cache-memcached-tls and tls-ticket-key-memcached-tls
options are deprecated.
2016-03-24 00:22:13 +09:00
Tatsuhiro Tsujikawa
eec0b04a33
nghttpx: Enable/disable TLS per frontend address
...
This change allows user to disable TLS per frontend address using
no-tls keyword in --frontend option. We removed --frontend-no-tls in
favor of this new feature.
2016-03-23 23:56:09 +09:00
Tatsuhiro Tsujikawa
58b06f32a2
nghttpx: Configure TLS per backend routing pattern
...
We added "tls" parameter to --backend option to enable TLS on that
backend connection. --backend-tls options was deprecated, now is
noop.
2016-03-23 22:56:18 +09:00
Tatsuhiro Tsujikawa
5b58db39ff
nghttpx: Fix failure case when comparing backend address set
2016-03-23 22:13:53 +09:00
Jacob Champion
1bc5cf5ee4
nghttp: time out on long Expect/Continue waits
...
To deal with servers that don't conform to RFC 7231 (or, potentially,
connections with a large round-trip time), don't wait forever for a 100
Continue status to come back. Currently, the timeout is hard-coded to
one second.
A ContinueTimer encapsulates the handshake timeout logic for a single
request. Somewhat counterintuitively, ContinueTimers are owned by the
HttpClient instead of the Request object, because their lifetime must be
bound to the life of the connection (which is owned by the HttpClient
and not the Requests). A Request is associated with its corresponding
ContinueTimer through a std::weak_ptr.
2016-03-22 13:10:00 -07:00
Jacob Champion
f4c7ebcbca
nghttp: implement Expect/Continue handshake
...
Requests that expect a 100 Continue will not submit their DATA frames
until the server sends the interim response.
2016-03-22 13:10:00 -07:00
Jacob Champion
feb3d1b478
nghttp: add an --expect-continue option
...
Add a placeholder for the expect-continue option, which will perform an
Expect/Continue handshake for DATA uploads.
2016-03-22 13:10:00 -07:00
Tatsuhiro Tsujikawa
7c954c1ea7
nghttpx: Workaround for Ubuntu 15.04 which does not value-initialize on std::make_shared.
2016-03-23 01:32:17 +09:00
Tatsuhiro Tsujikawa
e9f4d0eec2
nghttpx: Properly log incoming GOAWAY from backend
2016-03-23 01:16:44 +09:00
Tatsuhiro Tsujikawa
4f9c78799c
nghttpd: Fix compile error with Android NDK
2016-03-23 01:16:02 +09:00
Tatsuhiro Tsujikawa
0f9ed40bd9
nghttpx: Share connection among different patterns if address set are same
2016-03-23 00:01:27 +09:00
Tatsuhiro Tsujikawa
4bb88b35ec
nghttpx: "*" must match at least one character
2016-03-22 22:40:23 +09:00
Tatsuhiro Tsujikawa
04145e22a2
Revert "nghttpx: Call setsid after executing new binary"
...
This reverts commit 6680d8b792
.
2016-03-22 00:21:32 +09:00
Tatsuhiro Tsujikawa
dc3119303a
Rewrite concat_string_ref
2016-03-20 17:55:17 +09:00
Tatsuhiro Tsujikawa
d2b55ad1a2
nghttpx: Allow '*' in --error-page to be used as wildcard
2016-03-19 23:49:15 +09:00
Tatsuhiro Tsujikawa
d7051f5207
nghttpx: Add custom error pages
2016-03-19 23:41:21 +09:00
Tatsuhiro Tsujikawa
db1ee3aa88
nghttpd: Use StringRef
2016-03-19 20:57:40 +09:00
Tatsuhiro Tsujikawa
a1e0bd134e
nghttpx: Create at least the same number of h2 session as load balancing hosts
2016-03-19 12:00:27 +09:00
Tatsuhiro Tsujikawa
dcae6efaa2
nghttpx: Rewrite Downstream::assemble_request_cookie using StringRef
2016-03-19 11:38:09 +09:00
Tatsuhiro Tsujikawa
8da0d649e4
Merge branch 'cmake' of https://github.com/Lekensteyn/nghttp2 into Lekensteyn-cmake
2016-03-19 11:20:31 +09:00
Peter Wu
d10f149161
cmake: fix Windows support
...
Fix Windows build by defining `ssize_t` when missing and adjusting the
install commands.
Add support for ENABLE_WERROR=1 while at it.
Tested with MSVC 2013 on Windows 7 x64.
2016-03-16 17:33:20 +01:00
Peter Wu
3a2a943fe9
cmake: do not fail without libxml2
...
Avoid adding a LIBXML2_LIBRARIES-NOTFOUND to the libraries list when it
is not found. Likewise for OpenSSL.
2016-03-16 17:33:10 +01:00
Peter Wu
162b1c5e03
cmake: only install ASIO headers when requested
2016-03-15 00:02:46 +01:00
Peter Wu
dc56b951df
src/Makefile.am: fix missing allocator.h
...
Fix regression from v1.8.0-38-gbae37e3 breaking distcheck.
2016-03-14 17:49:23 +01:00
Peter Wu
7c55c335cc
Merge branches 'master' and 'cmake-updated' into cmake
...
Update to latest master with appropriate cmake changes at the same time.
2016-03-14 17:26:15 +01:00
Peter Wu
2ddb83206b
cmake: sync with v1.8.0-63-g37b09f6
...
Adds missing source files and configure.ac changes since
v1.7.0-93-g093eb51.
2016-03-14 17:20:37 +01:00
Tatsuhiro Tsujikawa
ab734f09b6
nghttpx: Fix possible crash in rare case
2016-03-15 00:46:15 +09:00
Tatsuhiro Tsujikawa
dd2bdf3e31
nghttpx: Update doc
2016-03-14 23:53:10 +09:00
Tatsuhiro Tsujikawa
a909bb3eca
nghttpx: Initialize proto field
2016-03-14 23:47:29 +09:00
Tatsuhiro Tsujikawa
01408209d8
nghttpx: Fix the bug that forwarded query contains duplicated '?'
...
This change also fixes that bug that the multiple '/' at the start of
request were not coalesced into one.
2016-03-14 22:20:00 +09:00
Peter Wu
7f8110601e
cmake: fix compatibility with cmake before 3.3
...
The COMPILE_LANGUAGE generator expression is only supported since CMake
3.3. Moreover, it does not work with all generators (works with Makefile
and Ninja, but not with Visual Studio).
target_compile_options would only work if a target does not mix C and
C++ sources, since the flags are intended to be set for a specific
language, use set_source_files_properties instead. This approach is also
less repetitive.
Drop the idea of using lists and COMPILE_OPTIONS,
set_source_files_properties only understands COMPILE_FLAGS (a single
string, not a list).
2016-03-13 12:30:41 +01:00
Tatsuhiro Tsujikawa
2a606bae4c
Add nghttp2_error_callback to tell application human readable error message
2016-03-13 18:22:52 +09:00
Tatsuhiro Tsujikawa
3b2811bfc4
nghttpx: Remove AltSvc ctor
2016-03-13 14:01:59 +09:00
Tatsuhiro Tsujikawa
27275a02ac
nghttpx: Remove unused EMPTY_STRING
2016-03-13 13:59:06 +09:00
Tatsuhiro Tsujikawa
34d209b30b
nghttpx: Add wildcard host routing
...
This change allows host pattern in --backend to include '*' to
indicate wildcard match. The wildcard match is made in suffix match
only.
2016-03-13 01:01:34 +09:00
Tatsuhiro Tsujikawa
94f52d49dc
BlockAllocator: Delete copy ctor and assignment operator
2016-03-12 21:25:53 +09:00
Tatsuhiro Tsujikawa
0ee09320e0
src: Remove unused value_to_str
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
78fcb2143f
Update doc
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
755b14de5d
src: Unify path_join implementation
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
3455cb35e4
nghttpx: Rewrite create_forwarded to use BlockAllocator
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
c1571a3209
src: Rewrite xff handling
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
67569486d1
src: Rewrite http:create_via_header_value
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
d64051fedc
src: Return StringRef from http2::stringify_status
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
c897d5b294
src: Use StringRef in parse_http_date
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
863a944179
src: Add specialization for char to avoid reinterpret_cast in constexpr
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
12dad32890
Add nghttp2_on_header_callback2
2016-03-12 21:13:09 +09:00
Tatsuhiro Tsujikawa
eb393985b7
nghttpx: Make a copy before adding header to Downstream
2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa
7a412df9a5
nghttpx: Fix tests
2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa
b1b57cc740
nghttpx: Use StringRef for authority, scheme and path
2016-03-12 21:12:26 +09:00
Peter Wu
bdb6581990
Add CMake-related files to EXTRA_DIST
2016-03-12 01:38:12 +01:00
Peter Wu
618073e2b4
cmake: add "check" target
...
Add a "check" target that builds tests before running them.
2016-03-12 00:57:30 +01:00
Tatsuhiro Tsujikawa
fa601e5ba3
Add isolation_threshold, use field to store block size rather than template parameter
2016-03-09 21:25:11 +09:00
Tatsuhiro Tsujikawa
bae37e3e4a
nghttpx: Add custom memory allocator mainly for header related objects
2016-03-09 21:16:28 +09:00
Tatsuhiro Tsujikawa
907eeeda8a
src: Return StringRef from util::get_uri_field
2016-03-08 21:38:15 +09:00
Tatsuhiro Tsujikawa
fe6ccd16da
nghttpx: Change read timeout reset timing
2016-03-05 19:11:36 +09:00
Tatsuhiro Tsujikawa
10ec00126c
src: Don't process rel=preload again once we found it
2016-03-04 23:00:33 +09:00
Tatsuhiro Tsujikawa
2d6211c455
asio: Fix bug that server event loop breaks with exception
...
This can happen when we call throwing version of
basic_stream_socket::remote_endpoint() call while client disconnected.
2016-03-04 22:43:36 +09:00
Tatsuhiro Tsujikawa
e302cc9c16
src: Simplify function parameter using StringRef
2016-03-04 00:38:43 +09:00
Tatsuhiro Tsujikawa
3f2b54cfc4
src: Refactor using StringRef
2016-03-04 00:33:35 +09:00
Tatsuhiro Tsujikawa
acbf38fd3c
src: Refactor using StringRef, simplify function parameters
2016-03-04 00:26:59 +09:00
Tatsuhiro Tsujikawa
1e8bea15e5
src: Use StringRef inside LinkHeader
2016-03-03 23:31:44 +09:00
Tatsuhiro Tsujikawa
aaf0177318
src: Use str_size
2016-03-03 23:23:51 +09:00
Tatsuhiro Tsujikawa
9afc017532
src: Don't push if Link header field includes nopush
2016-03-03 23:20:32 +09:00
Tatsuhiro Tsujikawa
5da38b22c0
h2load: Fix bug that it did not try to connect to server again
2016-03-02 22:24:14 +09:00
Tatsuhiro Tsujikawa
ce61f62644
h2load: Fix bug that initial max concurrent streams was too large
2016-03-02 21:18:42 +09:00
Tatsuhiro Tsujikawa
a21c87d11c
Add nghttp2_http2_strerror() to return HTTP/2 error code string
2016-02-29 23:10:20 +09:00
Tatsuhiro Tsujikawa
478fde5fef
nghttpx: Fix compile error
2016-02-29 01:16:45 +09:00
Tatsuhiro Tsujikawa
284691253f
nghttpx: Use StringRef for http::create_forwarded parameter
2016-02-29 00:05:32 +09:00
Tatsuhiro Tsujikawa
124d4c9fad
src: Fix tests
2016-02-29 00:05:32 +09:00
Tatsuhiro Tsujikawa
5fbe4cc225
nghttpx: Clear upgrade_request flag when Downstream is attached to HTTP/2 backend
2016-02-28 23:21:57 +09:00
Tatsuhiro Tsujikawa
df6466cfbd
nghttpx: Update doc
2016-02-28 23:15:57 +09:00
Tatsuhiro Tsujikawa
2326337d32
nghttpx: Deprecate backend-http1-connections-per-host in favor of backend-connections-per-host
2016-02-28 22:15:49 +09:00
Tatsuhiro Tsujikawa
06921f35f3
nghttpx: Restructure mode settings
...
It is very hard to support multiple protocols in backend while
retaining multiple mode settings. Therefore, we dropped modes except
for default and HTTP/2 proxy mode. The other removed modes can be
emulated using combinations of options. Now the backend connection is
not encrypted by default. To enable encryption on backend connection,
use --backend-tls option.
2016-02-28 21:35:26 +09:00
Tatsuhiro Tsujikawa
44d3801760
nghttpx: Deprecate backend-http1-connections-per-frontend in favor of backend-connections-per-frontend
2016-02-28 17:11:12 +09:00
Tatsuhiro Tsujikawa
1832f78684
nghttpx: Move downstream proto to DownstreamAddrGroup
2016-02-28 16:56:14 +09:00
Tatsuhiro Tsujikawa
e7601cde8a
nghttpx: Don't share session which is already in draining state
2016-02-28 12:41:34 +09:00
Tatsuhiro Tsujikawa
36f6a009b8
nghttpx: Effectively disable backend HTTP/2 connection flow control
...
This is required to avoid session stall because of too slow frontend
connection.
2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
aafcc55006
nghttpx: Deprecate --http2-max-concurrent-streams option
...
We added 2 new option instead: --frontend-http2-max-concurrent-streams
and --backend-http2-max-concurrent-streams.
2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
c731d1fea5
nghttpx: Deprecate --backend-http2-connections-per-worker option
2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
aa892e4d37
nghttpx: Share TLS session cache between HTTP/2 and HTTP/1 backend
2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
8ca3e5f6ba
nghttpx: Separate Downstream address group from config to runtime
2016-02-28 00:19:18 +09:00
Tatsuhiro Tsujikawa
21007da392
nghttpx: Rewrite backend HTTP/2 connection coalesce strategy
...
Previously, we use one Http2Session object per DownstreamAddrGroup.
This is not flexible, and we have to provision how many HTTP/2
connection is required in advance. The new strategy is we add
Http2Session object on demand. We measure the number of attached
downstream connection object and server advertised concurrency limit.
As long as former is smaller than the latter, we attach new downstream
connection to it. Once the limit is reached, we create new
Http2Session object. If the number lowers the limit, we start to
share Http2Session object again.
2016-02-28 00:19:18 +09:00