Commit Graph

1627 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa d2a63a88a0 nghttpx: Fix stall if read buffer has app data when handshake finished 2015-08-11 22:37:15 +09:00
Tatsuhiro Tsujikawa 8410f684fb nghttpx: Drop connection if client hello is too large 2015-08-10 00:29:43 +09:00
Tatsuhiro Tsujikawa ff44e211ed nghttpx: Fix tls handshake bug
This fixes 2 things:
1. potential busy loop
2. disabling ticket is not working after resumption
2015-08-09 18:33:49 +09:00
Tatsuhiro Tsujikawa 2e7cee0faa h2load: Code cleanup 2015-08-09 01:05:15 +09:00
Tatsuhiro Tsujikawa 50eac7bdf0 h2load: Fix -r does not work without -C option 2015-08-09 00:24:17 +09:00
Tatsuhiro Tsujikawa 846da5fb3f h2load: Update doc 2015-08-08 23:44:47 +09:00
Tatsuhiro Tsujikawa 3e53cd189c clang-format-3.5 2015-08-08 23:36:02 +09:00
Tatsuhiro Tsujikawa 0bbff5b738 nghttpx: Continue if push was failed 2015-07-31 21:25:43 +09:00
Tatsuhiro Tsujikawa a152c6346d Fix build error with Android NDK 2015-07-30 22:57:25 +09:00
Tatsuhiro Tsujikawa c379b46a26 Remove monotonic_clock replacement macro for gcc-4.6 2015-07-29 21:19:33 +09:00
Tatsuhiro Tsujikawa 6446660113 nghttpx: Make record size timeout more durable to high load situation 2015-07-29 20:57:11 +09:00
Tatsuhiro Tsujikawa d0a37d59a5 nghttpx: Disable TLS session ticket if ticket key is not available 2015-07-29 20:38:49 +09:00
Tatsuhiro Tsujikawa a73cfd5f7b nghttpx: Add reference to manual section for session resumption 2015-07-29 00:00:43 +09:00
Tatsuhiro Tsujikawa a1288a5826 nghttpx: Rename --tls-ticket-cipher as --tls-ticket-key-cipher 2015-07-28 23:49:37 +09:00
Tatsuhiro Tsujikawa 80d96590c5 nghttpx: Update doc 2015-07-28 23:43:32 +09:00
Tatsuhiro Tsujikawa 6ad332b801 nghttpx: Call disconnect() when memcached connection cannot be made 2015-07-28 21:19:27 +09:00
Tatsuhiro Tsujikawa f1b163a32c nghttpx: Log notice level when TLS ticket key was retrieved from memcached 2015-07-28 02:19:14 +09:00
Tatsuhiro Tsujikawa 4d7be08585 nghttpx: Do some macro dance for IOV_MAX 2015-07-28 01:26:34 +09:00
Tatsuhiro Tsujikawa a6fdca730d nghttpx: Add options to set maximum retry and failure when getting ticket keys 2015-07-28 01:17:29 +09:00
Tatsuhiro Tsujikawa 4949dd4888 nghttpx: Add --tls-ticket-key-memcached-interval option 2015-07-28 01:02:33 +09:00
Tatsuhiro Tsujikawa 2f2a300e83 nghttpx: Add TLS ticket key sharing among nghttpx instances using memcached 2015-07-28 00:54:44 +09:00
Tatsuhiro Tsujikawa a4a9cfd650 nghttpx: Change session cache key prefix 2015-07-27 21:18:12 +09:00
Tatsuhiro Tsujikawa bb228c27de Merge branch 'master' into memcached
Conflicts:
	src/shrpx_ssl.cc
2015-07-27 21:16:02 +09:00
Tatsuhiro Tsujikawa 7152e0f6b8 nghttpx: Fix bug that decrypt only key is not considered 2015-07-27 21:13:02 +09:00
Tatsuhiro Tsujikawa 72cfdbc0fa nghttpx: Fix compile error on travis (again) 2015-07-27 02:28:36 +09:00
Tatsuhiro Tsujikawa f472e6ff48 nghttpx: Fix compile error on travis 2015-07-27 02:22:27 +09:00
Tatsuhiro Tsujikawa 1708d2e69e nghttpx: Add doc 2015-07-27 02:14:52 +09:00
Tatsuhiro Tsujikawa e3cdfd12ea nghttpx: Use std::array for TicketKey 2015-07-27 02:12:07 +09:00
Tatsuhiro Tsujikawa cd25c6846e nghttpx: Create struct Address which holds struct sockaddr_union and length 2015-07-27 01:41:10 +09:00
Tatsuhiro Tsujikawa efcd43a367 nghttpx: Don't enable read timer while connecting to HTTP/1 server 2015-07-27 01:18:52 +09:00
Tatsuhiro Tsujikawa 90b4b48c7e nghttpx: Add shared session cache using memcached 2015-07-26 23:33:06 +09:00
Nora Shoemaker 12013508bf Running clang-format 2015-07-24 15:35:11 -07:00
Nora Shoemaker 85e4151bca manual merge 2015-07-24 15:17:22 -07:00
Nora Shoemaker 278247faa9 Starting a second earlier 2015-07-24 14:34:53 -07:00
Tatsuhiro Tsujikawa adec2c06bf nghttpx: Set SSL/TLS session timeout to 12 hours 2015-07-24 23:59:19 +09:00
Tatsuhiro Tsujikawa 6c8243f6d2 nghttpd: Add verbose output when SSL/TLS session is reused 2015-07-24 23:40:44 +09:00
Tatsuhiro Tsujikawa afbb99ecf7 nghttpx: Enable session resumption on HTTP/2 backend 2015-07-24 23:40:27 +09:00
Tatsuhiro Tsujikawa abce7c7210 nghttpd: Fix the bug that 304 response has non-empty body 2015-07-24 23:25:10 +09:00
Nora Shoemaker ec617ae6e5 Getting rid of unused fields in config 2015-07-23 11:21:12 -07:00
Nora Shoemaker d6786f75cb Getting rid of unused fields in Worker 2015-07-23 11:01:09 -07:00
Nora Shoemaker 584f5f3734 Do not allow -r > -t 2015-07-23 10:37:51 -07:00
Nora Shoemaker a04c67bcd6 Getting rid of print statements 2015-07-23 10:30:55 -07:00
Nora Shoemaker 8325c6ccdf setting request number correctly: 2015-07-23 10:20:18 -07:00
Nora Shoemaker 30235f8809 Assigning clients to workers proportional to rate 2015-07-23 09:37:44 -07:00
Tatsuhiro Tsujikawa 9b63fc011e nghttpx: Open log files by default configuration 2015-07-24 00:32:19 +09:00
Tatsuhiro Tsujikawa cab6c7871c nghttpx: Don't rewrite host header field by default
In reverse proxy usage, backend server most likely wants to see the
original header field.  So this commit turns off host header rewrite
by default.  --no-host-rewrite option is deprecated, and if it is
used, warning message is displayed.  --host-rewrite option is added to
enable host rewrite.
2015-07-23 23:54:56 +09:00
Tatsuhiro Tsujikawa 04bd25d468 nghttpx: Simplify ticket handling between workers just using mutex 2015-07-23 23:13:29 +09:00
Tatsuhiro Tsujikawa cd2c751f82 nghttpx: Generate new ticket key every 1hr and its life time is now 12hrs 2015-07-23 21:14:38 +09:00
Nora Shoemaker 65df3c63bf Adding new rate and connection allocation to threads 2015-07-22 16:41:58 -07:00
Tatsuhiro Tsujikawa 44cbc785fc nghttpx: Don't reuse backend connection if it is not clean 2015-07-22 21:41:16 +09:00
Nora Shoemaker 916e27489f rate now working 2015-07-21 16:53:46 -07:00
Nora Shoemaker 650e463a49 First try with something working, still need to clean and test 2015-07-21 11:28:12 -07:00
Nora Shoemaker 52152ad96d Can make h2load, but running into recursive loop problem 2015-07-21 11:06:33 -07:00
Tatsuhiro Tsujikawa 921e393dcd src: Use <PATH> instead of <FILE> in usage text 2015-07-20 23:50:05 +09:00
Tatsuhiro Tsujikawa 0ec1b98f27 nghttpx: Reorder config fields 2015-07-20 23:15:01 +09:00
Tatsuhiro Tsujikawa a8574fdef2 nghttpx: Use Use std::string instead of std::unique_ptr<char[]> for tls config 2015-07-20 23:15:01 +09:00
Tatsuhiro Tsujikawa dd8ce1e9d2 nghttpx: Use std::unique_ptr<char[]> instead of raw char pointer 2015-07-20 21:37:23 +09:00
Tatsuhiro Tsujikawa ca3444c34c Fix compile error/warnings with gcc-4.7 2015-07-19 20:50:14 +09:00
Tatsuhiro Tsujikawa fa7a74cfa8 h2load: Use std::string::size instead of strlen 2015-07-19 18:37:41 +09:00
Tatsuhiro Tsujikawa b37716ab6a h2load: Workaround with clang-3.4 2015-07-19 18:35:14 +09:00
Tatsuhiro Tsujikawa 5dc060c1a2 src: Use C++11 value-initialization, instead of memset-ing 0 2015-07-19 17:55:37 +09:00
Tatsuhiro Tsujikawa 05d5c404e2 Merge branch 'tls-session-ticket-aes256' 2015-07-19 17:38:34 +09:00
Tatsuhiro Tsujikawa cce64e6728 h2load: Call second_timeout_cb manually so that we don't waste first 1 second 2015-07-19 17:31:35 +09:00
Tatsuhiro Tsujikawa 006ac7b1b0 h2load: Fix HTML formatting 2015-07-19 17:27:38 +09:00
Tatsuhiro Tsujikawa 5465cdf4a4 src: Don't use struct tm.tm_yday from strptime 2015-07-19 17:14:25 +09:00
Tatsuhiro Tsujikawa ad87266a58 Merge branch 'h2load_r_C' of https://github.com/nshoemaker/nghttp2 into nshoemaker-h2load_r_C 2015-07-19 16:04:43 +09:00
Nora Shoemaker d326e28c92 running clang-format 2015-07-17 14:10:40 -07:00
Nora Shoemaker c1c177addc Changing warning to mention #reqs rather than test time 2015-07-17 14:10:21 -07:00
Tatsuhiro Tsujikawa e8167ceea7 nghttpx: Add AES-256-CBC encryption for TLS session ticket 2015-07-18 02:02:33 +09:00
Nora Shoemaker eeba12144c Refactored seconds setting and worker space reservation 2015-07-16 11:02:01 -07:00
Nora Shoemaker ce00c50720 Changing comparison from double to ssize_t 2015-07-16 10:51:41 -07:00
Nora Shoemaker 7d2ea42c38 Fixing spelling mistake in num-conns description 2015-07-16 10:43:50 -07:00
Nora Shoemaker e0d7ce439d Fixing style for Config field initializer list 2015-07-16 10:35:03 -07:00
Nora Shoemaker ccfe7f8548 Reordering Config field initializer list 2015-07-16 10:33:44 -07:00
Tatsuhiro Tsujikawa c470ac7b00 asio: Fix missing nghttp2_timegm 2015-07-16 14:01:18 +09:00
Nora Shoemaker 5892385e5c [EDGE-879] run clang-format and make sure style is good 2015-07-15 09:51:33 -07:00
Tatsuhiro Tsujikawa 8585599b4b nghttpx: Add doc 2015-07-16 00:03:34 +09:00
Tatsuhiro Tsujikawa 2bac00ea5f nghttpx: Add additional assert just in case 2015-07-16 00:01:26 +09:00
Tatsuhiro Tsujikawa 7a3012cc1b src: Rename timegm as nghttp2_timegm 2015-07-15 23:44:24 +09:00
Tatsuhiro Tsujikawa ba31b990a2 nghttpx: Remove dead handling of Downstream::STREAM_CLOSED 2015-07-15 23:33:44 +09:00
Tatsuhiro Tsujikawa fc062976a1 nghttpx: Delete DownstreamConnection from Downstream explicitly 2015-07-15 23:31:32 +09:00
Tatsuhiro Tsujikawa 20e63151a5 nghttpx: Fix bug that idle timer is used after reuse 2015-07-15 23:18:32 +09:00
Tatsuhiro Tsujikawa e63e775fea nghttpx: Simplify BlockedLink management 2015-07-15 20:44:44 +09:00
Tatsuhiro Tsujikawa 031fb31248 nghttpx: Fix memory leak, and blocked stream dispatch 2015-07-15 19:47:15 +09:00
Tatsuhiro Tsujikawa 6d10799301 nghttpx: Don't pool failed HTTP/1 backend connection 2015-07-15 19:46:48 +09:00
Nora Shoemaker d6551de8d4 [EDGE-877] [h2load] apply changes to new version of h2load 2015-07-14 23:41:29 +00:00
Nora Shoemaker 6b53f7ee19 [EDGE-879] run clang-format and make sure style is good 2015-07-14 11:16:37 -07:00
Tatsuhiro Tsujikawa 326ac31a23 nghttpx: Update doc 2015-07-14 23:45:50 +09:00
Tatsuhiro Tsujikawa a2c78cfc69 nghttpx: Update doc 2015-07-14 23:44:58 +09:00
Tatsuhiro Tsujikawa 4fed7a1476 nghttpx: Refactor log format parsing 2015-07-14 23:36:44 +09:00
Tatsuhiro Tsujikawa 8c1e863523 nghttpx: Refactor option name lookup 2015-07-14 23:21:38 +09:00
Tatsuhiro Tsujikawa 27da08ee68 nghttpx: Add inline LogFragment ctor 2015-07-14 22:43:02 +09:00
Tatsuhiro Tsujikawa 0a6877d091 nghttpx: Supply template version strcopy 2015-07-14 22:40:33 +09:00
Tatsuhiro Tsujikawa 7f7b6d641d nghttpx: Allow log variable to be enclosed by curly braces 2015-07-14 22:25:52 +09:00
Tatsuhiro Tsujikawa 7c301defbd clang-format src/nghttp.cc 2015-07-14 21:37:34 +09:00
Nora Shoemaker 2482dd7f77 Adding -r and -C options to h2load 2015-07-13 11:28:15 -07:00
Tatsuhiro Tsujikawa fb7775e382 nghttpx: Detect loop in --include paths 2015-07-13 21:44:06 +09:00
Tatsuhiro Tsujikawa f96edbf987 nghttpx: Pin frontend to specific HTTP/2 session object per group 2015-07-13 21:31:37 +09:00
Tatsuhiro Tsujikawa 3097547491 nghttpx: Add --include option to read additional configuration from given file 2015-07-12 23:18:36 +09:00
Tatsuhiro Tsujikawa 6307f96fb3 nghttpx: Enable host-path backend routing in HTTP/2 backend
To achieve host-path backend routing, we changed behaviour of
--backend-http2-connections-per-worker.  It now sets the number of
HTTP/2 physical connections per pattern group if pattern is used in -b
option.

Fixes GH-292
2015-07-12 23:02:30 +09:00
Tatsuhiro Tsujikawa 8a2543d7b7 asio: Fix custom OpenSSL build 2015-07-11 19:37:04 +09:00
Tatsuhiro Tsujikawa fa7069a273 nghttpx: Don't rewrite path if http2 proxy or client proxy is enabled
There are many requests which changes its meaning when we rewrite
path.  This is due to bad percent-encoding in URI; reserved characters
are just used without percent encoding.  It seems this is common in ad
services, but I suspect more to come.  For reverse proxying situation,
sane service most likely encodes URI properly, so probably this is not
an issue.
2015-07-11 17:50:58 +09:00
Tatsuhiro Tsujikawa 1a63cd94aa nghttpx: Pass by reference, since it just get copied there 2015-07-11 17:30:38 +09:00
Tatsuhiro Tsujikawa 7c216c6df8 nghttpx: Document that patterns with host take precedence 2015-07-11 16:46:13 +09:00
Tatsuhiro Tsujikawa e7724914a9 nghttpx: Less copy when matching path 2015-07-11 16:46:13 +09:00
Tatsuhiro Tsujikawa 19e47a1922 nghttpx: Normalize path when setting it to Downstream 2015-07-11 16:12:35 +09:00
Tatsuhiro Tsujikawa c2e4ed9624 nghttpx: Deal with the path without trailing slash on pattern match
If pattern ends with '/', and pattern and path matches without that
slash, we consider they match to deal with request to the directory
without trailing slash.  That is if pattern is "/foo/" and path is
"/foo", we consider they match.
2015-07-11 12:43:48 +09:00
Tatsuhiro Tsujikawa d457f39b1e nghttpx: Fix unix domain backend 2015-07-11 02:41:33 +09:00
Tatsuhiro Tsujikawa 6d556755ee Attemp to fix travis build error 2015-07-11 02:08:16 +09:00
Tatsuhiro Tsujikawa 3119fc259c Select backend based on request host and path by extending -b option
-b option syntax is now <HOST>,<PORT>[;<PATTERN>[:...]].  The optional
<PATTERN>s specify the request host and path it is used for.  The
<PATTERN> can contain path, host + path or host.  The matching rule is
closely designed to ServeMux in Go programming language.
2015-07-11 00:15:52 +09:00
Tatsuhiro Tsujikawa 237f742100 h2load: Add --ciphers option 2015-07-08 23:14:41 +09:00
Tatsuhiro Tsujikawa 8fcf5f60e4 nghttp: Add --max-concurrent-streams option 2015-07-08 00:22:21 +09:00
Tatsuhiro Tsujikawa 7af638f921 Merge branch 'patch-2' of https://github.com/acesso/nghttp2 into acesso-patch-2 2015-07-07 21:19:23 +09:00
Tatsuhiro Tsujikawa 43d6f6b16a Compile with IRIX gcc-4.7
Patch from Klaus Ziegler
2015-07-01 21:30:27 +09:00
Tatsuhiro Tsujikawa 2f7839fa42 Fix compiler warning 2015-06-30 21:33:54 +09:00
acesso 49c3d75f9a Right place for comment
comment of pushed moved from request to entry array
added stream_id as string to connection element as string
2015-06-29 15:31:00 -03:00
Tatsuhiro Tsujikawa dc7232fa53 Fix travis compile error 2015-06-30 00:01:26 +09:00
Tatsuhiro Tsujikawa 51ef646678 src: Always use our own faster simpler timegm, use it to calculate gmtoff 2015-06-29 23:14:54 +09:00
Tatsuhiro Tsujikawa 515c313073 nghttpx: Add $ssl_session_reused log variable
The syntax for this variable is the same as nginx: if SSL/TLS session
was reused, "r" is produced.  Otherwise ".".
2015-06-28 22:15:04 +09:00
Tatsuhiro Tsujikawa 197493afd4 nghttpx: Add log variables related to SSL/TLS connection
This commit add following 3 log variables to SSL/TLS connection:
$ssl_cipher, $ssl_protocol, $ssl_session_id.  If no information is
available for them, '-' is produced for each.
2015-06-28 16:44:34 +09:00
acesso 2ea1deafd0 Add comment on HAR on pushed objects
It seems that HAR 1.2 does not have a proper representaion for pushed objects. I could´t just add a custom parameter so I think a comment at response will not hurt anybody.
2015-06-27 09:47:53 -03:00
Tatsuhiro Tsujikawa b06e339dbb Prepare for IRIX support, port relevant change from spdylay 2015-06-27 17:51:07 +09:00
Tatsuhiro Tsujikawa 68c0f8a310 Fix compile error with gcc-4.7
Use std::map::insert instead of std::map::emplace, since gcc-4.7 does
not support the latter.
2015-06-27 11:19:54 +09:00
Tatsuhiro Tsujikawa 285c74c394 nghttpx: Fix crash with --http2-bridge and both frontend and backend TLS 2015-06-24 21:31:17 +09:00
Tatsuhiro Tsujikawa 301df2a856 src: Disable SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 2015-06-22 23:26:45 +09:00
Tatsuhiro Tsujikawa f3b7f4140b nghttpx: Clarify origin host for --backend-http1-connection-per-host 2015-06-22 21:09:39 +09:00
Tatsuhiro Tsujikawa 878b873c69 src: Use using instead of typedef 2015-06-21 19:37:50 +09:00
Tatsuhiro Tsujikawa 2ca8cf36b7 util: Use constexpr for ALPN id 2015-06-21 19:34:43 +09:00
Tatsuhiro Tsujikawa cebfdacc5a src: Use user-defined literals for time (hours and minutes) 2015-06-21 14:51:32 +09:00
Tatsuhiro Tsujikawa 39f89f4a60 src: Use user-defined literals for k, m, and g. 2015-06-21 14:32:47 +09:00
Tatsuhiro Tsujikawa 0a6de0d378 nghttp: Perform special handling of IPv6 literal with zone ID as per RFC 6874
This commit adds special handling of IPv6 literal with zone ID as per
RFC 6874.  Still IPv6 link local address does not work, since URI
parser from http-parser does not allow this syntax.
2015-06-18 20:00:02 +09:00
Tatsuhiro Tsujikawa 25d1de0278 nghttp: Print error if all connect() syscall faild 2015-06-18 18:03:25 +09:00
Tatsuhiro Tsujikawa 39eb8b8a6b nghttp: Print error when parsing URI failed 2015-06-18 18:00:24 +09:00
Tatsuhiro Tsujikawa 69119f47c4 src: Support compile with LibreSSL 2015-06-17 18:24:51 +09:00
Tatsuhiro Tsujikawa 8aab74ad36 nghttpx: Refactor a bit 2015-06-16 21:31:33 +09:00
Tatsuhiro Tsujikawa f418d1239f nghttpx: Fix bug that XFP header always http on HTTP/2 backend
This commit fixes the bug that x-forwarded-proto header field sent on
HTTP/2 backend always "http", regardless of frontend scheme.
2015-06-16 21:29:47 +09:00
Tatsuhiro Tsujikawa 5b51320dc5 nghttpx: Validate :path on SPDY frontend
Unless method is CONNECT, we require that :path starts with "/",
except for OPTIONS method, which can take "*" as :path (server-wide
OPTIONS request).
2015-06-16 00:09:22 +09:00
Tatsuhiro Tsujikawa 6d5c00b8eb nghttpx: Use vector for WorkerEvent queue 2015-06-12 21:28:24 +09:00
Tatsuhiro Tsujikawa 532bffdb01 nghttpx: Minimize critical section for shared ocsp response 2015-06-12 21:27:12 +09:00
Tatsuhiro Tsujikawa c6c7145167 Fix compile warning with android NDK 2015-06-12 19:19:53 +09:00
Tatsuhiro Tsujikawa d4d7597efb nghttpx: Delete SSL_CTX on quit 2015-06-10 21:31:58 +09:00
Tatsuhiro Tsujikawa 2952706b53 Fix scan-build error 2015-06-10 00:29:03 +09:00
Tatsuhiro Tsujikawa 9b0ccdef34 h2load: Code cleanup 2015-06-10 00:28:27 +09:00
Tatsuhiro Tsujikawa 41dd5f6897 nghttpx: Tokenize request method
We share the same method value with http-parser.  This commit also
returns 501 for unknown request method on HTTP/2 and SPDY frontend.
2015-06-09 23:33:14 +09:00
Tatsuhiro Tsujikawa f9c60d5e9d nghttpx: Return 501 if invalid method is received on h1 frontend 2015-06-09 22:08:49 +09:00
Tatsuhiro Tsujikawa 6d537c419e nghttpx: Document failure case on bind() 2015-06-07 00:05:33 +09:00
Tatsuhiro Tsujikawa 4894e24dc8 nghttpx: Add error logging for listener socket creation failure 2015-06-07 00:02:30 +09:00
Tatsuhiro Tsujikawa bbbddedb8f Fix compiler warning 2015-06-06 23:37:46 +09:00
Tatsuhiro Tsujikawa 00efa86fb6 nghttpx: Add --add-request-header option 2015-06-05 23:04:20 +09:00
Tatsuhiro Tsujikawa 590a5c3ff3 Fix typo 2015-06-05 00:18:29 +09:00