Commit Graph

2450 Commits

Author SHA1 Message Date
dalf d448eb54f9 Fix compilation with BoringSSL 2016-10-27 10:00:52 +00:00
Tatsuhiro Tsujikawa 46d1e6bb55 nghttpx: Increase block size of connection wide allocator to 512 2016-10-24 21:06:37 +09:00
Tatsuhiro Tsujikawa 3a831fa95c nghttpx: Fix file descriptor leak in read_tls_sct_from_dir 2016-10-24 20:30:30 +09:00
Tatsuhiro Tsujikawa 5b9cacc2d7 nghttpx: Discard iaddrs early 2016-10-23 19:55:58 +09:00
Tatsuhiro Tsujikawa 10a84f3e3d nghttpx: Rename errbuf for neverbleed as nb_errbuf for clarification 2016-10-23 19:26:22 +09:00
Tatsuhiro Tsujikawa c42715ed6a nghttpx: Fix compile error with --disable-threads 2016-10-23 19:26:22 +09:00
Tatsuhiro Tsujikawa 177d51ddab nghttpx: Use thread_local if it is available 2016-10-23 19:26:22 +09:00
Tatsuhiro Tsujikawa 6c882e1ece asio: Avoid repeated call of io_service::post 2016-10-20 22:12:31 +09:00
Tatsuhiro Tsujikawa f09c5c4bf9 xsi_strerror: Use stddef.h so that we can use size_t 2016-10-19 23:50:28 +09:00
Tatsuhiro Tsujikawa 08a9a2eca9 asio: Fix bug when end() is called outside nghttp2 callback 2016-10-19 23:17:43 +09:00
Tatsuhiro Tsujikawa 19f1785cde nghttpx: Avoid extra allocation on look up host key 2016-10-18 22:19:53 +09:00
Tatsuhiro Tsujikawa 8b64e7b4e1 src: Add XSI-compliant version strerror_r 2016-10-16 22:47:56 +09:00
Tatsuhiro Tsujikawa 3de2654223 src: Add noexcept to move constructor and assignment operator 2016-10-15 18:51:22 +09:00
Tatsuhiro Tsujikawa 0cf6848646 clang-format-3.9 2016-10-15 18:36:04 +09:00
Tatsuhiro Tsujikawa 1a37044d3c nghttpx: Use pre-allocated buffer for timestamp string 2016-10-11 22:32:26 +09:00
Tatsuhiro Tsujikawa 00a8c378d4 nghttpx: Add --backend-connect-timeout option 2016-10-10 22:50:41 +09:00
Tatsuhiro Tsujikawa 7549341081 Fix typo 2016-10-10 15:35:12 +09:00
Tatsuhiro Tsujikawa 5db8473f12 Fix build error with OpenSSL < 1.0.2 (again) 2016-10-09 19:34:32 +09:00
Tatsuhiro Tsujikawa 00b89f10bd Fix build error with OpenSSL < 1.0.2 2016-10-09 18:54:18 +09:00
Tatsuhiro Tsujikawa 412c8f9e67 nghttpx: Add TLS signed_certificate_timestamp extension support 2016-10-09 18:43:36 +09:00
Tatsuhiro Tsujikawa 2795da840c nghttpx: Apply timeout for incoming header block 2016-10-09 17:18:43 +09:00
Tatsuhiro Tsujikawa 175c7886ea nghttpx: Update doc 2016-10-09 17:18:29 +09:00
Tatsuhiro Tsujikawa 4a4b2cf538 nghttpx: Embed Process into OCSPUpdateContext 2016-10-08 15:26:13 +09:00
Tatsuhiro Tsujikawa 2c2188c09d nghttpx: Refactor ocsp command execution
We have now generic read-only command execution in shrpx_exec.{h,cc}.
2016-10-08 15:22:11 +09:00
Tatsuhiro Tsujikawa cdb1d6b462 nghttpx: Add P-384 and P-521 to the default of --ecdh-curves option 2016-10-08 11:44:03 +09:00
Tatsuhiro Tsujikawa 1b4ccd0d51 nghttpx: Don't call get_config() repeatedly 2016-10-08 11:37:18 +09:00
Tatsuhiro Tsujikawa 8babaac8c3 nghttpx: Add --ecdh-curves option to specify list of named curves
This option requires OpenSSL >= 1.0.2.  With OpenSSL 1.0.2, the
default value is "P-256".  With OpenSSL 1.1.0 or later, the default
value is "X25519:P-256".
2016-10-08 10:50:56 +09:00
Tatsuhiro Tsujikawa d1624d6929 h2load: Format default value of header table size with unit 2016-10-06 23:16:30 +09:00
Tatsuhiro Tsujikawa e4472b5aec h2load: Add --header-table-size and --encoder-header-table-size options 2016-10-06 22:26:31 +09:00
Tatsuhiro Tsujikawa 9439ba75d3 nghttpx: Fix heap-use-after-free when executing new binary 2016-10-04 00:32:02 +09:00
Tatsuhiro Tsujikawa 9254c563ca Fix compile error with gcc 2016-10-03 22:52:14 +09:00
Tatsuhiro Tsujikawa 96ff3be5e6 nghttpx: Use allocator of new config since this may happen multiple times 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa 3d5d76ba74 nghttpx: Update doc 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa 8c1e155f44 nghttpx: Make it simple to calculate length 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa dba0d2791c nghttpx: Use emplace_back instead of push_back 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa f310e82fc8 nghttpx: Update doc 2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa 1240e55bb6 nghttpx: Use const ref 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa 75039c573c base64: Assert that input is multiple of 4 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa 4b5179a544 nghttpx: Fix bug in util::make_hostport 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa 8efccddcf4 nghttpx: Use StringRef for HttpProxy 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa 97843e3874 nghttpx: Use StringRef for tls_proto_list 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa 5dd2704051 nghttpx: Use StringRef for tls.npn_list 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa de7b7fd440 nghttpx: Use StringRef for tls.subcerts 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa 1037d3ad26 nghttpx: Use StringRef for tls.ticket.files 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa c4368a9416 nghttpx: Use StringRef for AltSvc fields 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa fdc1eb526b nghttpx: Use HeaderRefs for add_request_headers and add_response_headers 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa 99a91e3172 nghttpx: Add BlockAllocator to Config object 2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa 272cfa320e nghttpx: Use BlockAllocator per DownstreamConfig 2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa f5285d1f5a nghttpx: Add BlockAllocator to SharedDownstreamAddr 2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa ede6104900 nghttpx: Increase block size for connection wide BlockAllocator 2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa 5aec60fbeb nghtpx: Add BlockAllocator version of base64 2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa e1a865c406 nghttpx: Add BlockAllocator version of util::formax_hex 2016-10-02 22:28:42 +09:00
Tatsuhiro Tsujikawa 5e03b6a0db nghttpx: Use BlockAllocator for util::quote_string 2016-10-02 00:07:26 +09:00
Tatsuhiro Tsujikawa b85924bf70 nghttpx: Use BlockAllocator to encode alt-svc token 2016-10-02 00:00:46 +09:00
Tatsuhiro Tsujikawa 19707aac55 nghttpx: Use StringRef for sni_name_ 2016-10-01 22:54:17 +09:00
Tatsuhiro Tsujikawa 9ad873fc06 nghttpx: Remove unused function declaration 2016-10-01 22:54:17 +09:00
Tatsuhiro Tsujikawa 8a9810ed32 nghttpx: Add BlockAllocator to ClientHandler 2016-10-01 22:54:17 +09:00
Tatsuhiro Tsujikawa 68a6d8c50b nghttpx: Realloc header buffer 2016-10-01 22:52:02 +09:00
Tatsuhiro Tsujikawa 600605400c nghttpx: Don't send RST_STREAM CANCEL to a pushed stream repeatedly 2016-09-27 23:49:01 +09:00
Tatsuhiro Tsujikawa 69b53b9aaa nghttpx: Handle graceful shutdown with client IP affinity enabled 2016-09-22 23:17:49 +09:00
Tatsuhiro Tsujikawa 231d739b10 nghttpx: Improve performance with h1 backend when request body is involved 2016-09-22 20:46:50 +09:00
Tatsuhiro Tsujikawa e1dfff8929 Use std::atomic_* overloads for std::shared_ptr if available 2016-09-20 22:39:01 +09:00
Tatsuhiro Tsujikawa db1716ae93 Fix -Wexpansion-to-defined warning with clang-3.9
The error message was:

warning: macro expansion producing 'defined' has undefined
behavior [-Wexpansion-to-defined]

http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html
2016-09-19 22:07:03 +09:00
Tatsuhiro Tsujikawa 03ba399176 nghttpx: Update doc 2016-09-17 22:38:06 +09:00
Tatsuhiro Tsujikawa 751d66a397 nghttpd: Check maximum value of -c option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa 3ec71bf5a2 nghttpd: Add --encoder-header-table-size option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa f19b0724a3 nghttp: Check maximum value of -c option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa a7e0a69f97 nghttp: Add --encoder-header-table-size option 2016-09-17 22:38:05 +09:00
Tatsuhiro Tsujikawa e532e20491 Merge branch 'master' into set-max-deflate-dynamic-table-size 2016-09-17 22:02:41 +09:00
Tatsuhiro Tsujikawa 3e1cfa8e99 nghttpx: Don't check downstream existence since dconn is one-to-one with it 2016-09-15 22:11:26 +09:00
Tatsuhiro Tsujikawa a100df9cae nghttpx: Remove redundant check using get_downstream_stream_id 2016-09-15 22:06:52 +09:00
Tatsuhiro Tsujikawa 56284b1e15 nghttpx: Fix regression introduced in f267e400fa 2016-09-15 22:03:04 +09:00
Tatsuhiro Tsujikawa f267e400fa nghttpx: Migrate backend stream to another h2 session on graceful shutdown 2016-09-15 00:53:41 +09:00
Tatsuhiro Tsujikawa 8bac5899cc nghttpx: Handle h2 backend error per Downstream
Previously we wrongly handles stream per connection when h2 backend
failed or closed.  If upstream is h2 or spdy, streams which are not
associated to the failed h2 backend are also handled, which is
unnecessary.
2016-09-14 22:18:38 +09:00
Tatsuhiro Tsujikawa f4016644a9 nghttpx: Add option to specify HPACK encoder/decoder dynamic table size 2016-09-12 22:53:02 +09:00
Tatsuhiro Tsujikawa d9bc6d04f7 nghttpx: Log client address 2016-09-11 23:30:33 +09:00
Tatsuhiro Tsujikawa a3a6b91c5f src: Rename OPENSSL_101_API macro as OPENSSL_1_1_API 2016-09-11 00:38:20 +09:00
Tatsuhiro Tsujikawa d508a0c72c nghttpx: Defer validation of request form after mruby handler 2016-09-10 22:09:13 +09:00
Tatsuhiro Tsujikawa bc31146c1f nghttpx: Add tls_sni to mruby Nghttpx::Env class
tls_sni returns TLS SNI value which client sent in this TLS
connection.
2016-09-10 22:08:34 +09:00
Tatsuhiro Tsujikawa 1ad7d5e366 nghttpx: Fix compile error gcc (again) 2016-09-10 17:13:01 +09:00
Tatsuhiro Tsujikawa 456038e3de nghttpx: Fix compile error with gcc 2016-09-10 16:51:35 +09:00
Tatsuhiro Tsujikawa 9aa26970be nghttpx: Comment out TCP logging since it is too verbose 2016-09-10 16:49:15 +09:00
Tatsuhiro Tsujikawa 20c39fa843 nghttpx: Use default connection window size with window size optimization 2016-09-10 16:45:28 +09:00
Tatsuhiro Tsujikawa f5a2f1da25 nghttpx: Add --frontend-http2-window-size option, and its family
We added --frontend-http2-window-size,
--frontend-http2-connection-window-size, --backend-http2-window-size,
and --backend-http2-connection-window-size option to replace existing
*-bits options.  The old options are not flexible because they only
specify number of bits.  Now we can specify integer value, with
possible g, m, and k unit.  The old options are still available for
backend compatibility, but are deprecated.
2016-09-10 16:27:48 +09:00
Tatsuhiro Tsujikawa 27b250ac8e nghttpx: Add experimental TCP optimization for h2 frontend 2016-09-10 16:27:48 +09:00
Tatsuhiro Tsujikawa 1dabe43ff4 nghttpx: Workaround for std::make_shared bug in Xcode7, 7.1, and 7.2
std::make_shared in Xcode 7, 7.1, and 7.2 does not perform
value-initialization, and causes undefined behaviour if struct does
not have user defined default constructor.  This workaround explicitly
defines user defined default constructor, and initializes values.
2016-09-04 23:30:24 +09:00
Tatsuhiro Tsujikawa ded576f423 nghttpx: Fix bug that bytes are doubly counted for TLS connections 2016-09-04 17:28:50 +09:00
Tatsuhiro Tsujikawa 136aae725f nghttpx: Add --no-server-rewrite option not to rewrite server header field 2016-08-31 23:47:15 +09:00
Tatsuhiro Tsujikawa 99dc31ff1a nghttpx: Retry if backend h1 connection cannot be established due to timeout 2016-08-30 23:37:49 +09:00
Tatsuhiro Tsujikawa 1064e017c6 nghttpx: Reset stream if invalid header field is received in h2 2016-08-28 00:49:38 +09:00
Tatsuhiro Tsujikawa 6ba1abac6c src: Only consider openssl 1.1.0 final 2016-08-27 00:45:16 +09:00
Tatsuhiro Tsujikawa 0110d2f9f8 Fix compile error with openssl 1.1.0 2016-08-27 00:02:03 +09:00
Tatsuhiro Tsujikawa 13d3f785bd Make ImmutableString(const std::string&) explicit 2016-08-26 22:52:08 +09:00
Tatsuhiro Tsujikawa 39c068974d Make ImmutableString(const char*) explicit 2016-08-26 22:40:59 +09:00
Tatsuhiro Tsujikawa 0d4d1a63d4 nghttpx: Add --server-name option to change server response header field 2016-08-26 22:28:09 +09:00
Tatsuhiro Tsujikawa 4749e66c67 nghttpx: Disallow copying Config 2016-08-25 22:55:12 +09:00
Tatsuhiro Tsujikawa cf7f87c2ad nghttpx: Log error code from getsockopt(SO_ERROR) on first write event 2016-08-25 00:25:03 +09:00
Tatsuhiro Tsujikawa 8f47b68a95 nghttpx: Set do_signal_write_ when TLS handshake was completed 2016-08-23 21:36:43 +09:00
Tatsuhiro Tsujikawa d9139fc286 asio: Fix reserved size 2016-08-22 22:30:25 +09:00
Tatsuhiro Tsujikawa 5f65460944 nghttpx: Don't change pushed stream's priority
There is a discussion in httpbis mailing list which argues that
dependency tree is for client, and changing it in server side is not
what client expects.
https://lists.w3.org/Archives/Public/ietf-http-wg/2016JulSep/0416.html

Currently, we make pushed stream depend on the parent stream of
associated stream (that is main HTML in most of the cases), so that
associated stream and pushed stream become siblings.  In this case, we
also observed that these resources complete each other to get its
parent weight.  This means that the delivery of associated stream is
delayed by pushed streams.

So at this moment, it is not a good idea to change pushed stream
priority in a way we do currently.
2016-08-20 22:09:18 +09:00