Tatsuhiro Tsujikawa
09bd9c94a3
asio: client: Should call shutdown_socket() on read error
2015-12-22 00:40:22 +09:00
Tatsuhiro Tsujikawa
6c1a76af6e
asio: Use std::move for remote_endpoint assignment
2015-12-20 14:00:58 +09:00
Tatsuhiro Tsujikawa
dd93b29397
clang-format
2015-12-20 12:48:39 +09:00
Tatsuhiro Tsujikawa
e71948d611
Merge branch 'master' of https://github.com/apohl79/nghttp2 into apohl79-master
2015-12-19 23:33:33 +09:00
Tatsuhiro Tsujikawa
5a2d75551d
h2load: Remove "(client)" from per-client req/s stat for simplicity
2015-12-19 22:56:10 +09:00
Andreas Pohl
9f2d064d7c
libnghttp2_asio: Optimized remote endpoint interface to const ref where possible
2015-12-19 14:08:15 +01:00
Tatsuhiro Tsujikawa
2d2188e77b
src: Add 451 status code
...
https://datatracker.ietf.org/doc/draft-ietf-httpbis-legally-restricted-status/
2015-12-19 18:35:01 +09:00
Andreas Pohl
a30dad4f5e
libnghttp2_asio: Added access to a requests remote endpoint
2015-12-16 18:38:21 +01:00
Tatsuhiro Tsujikawa
ef7d6e8a0c
nghttpx: Loose HTTP Upgrade condition
2015-12-16 00:38:30 +09:00
Tatsuhiro Tsujikawa
71012fe83a
nghttpx: Add constexpr
2015-12-15 22:47:05 +09:00
Tatsuhiro Tsujikawa
248a64f0b2
Compile with OpenSSL 1.1.0-pre1
2015-12-14 21:12:25 +09:00
Andreas Pohl
a4392d4a7f
libnghttp2_asio: Make io_service accessors const
2015-12-09 23:11:40 +01:00
Andreas Pohl
924fef1f32
libnghttp2_asio: Added io_service accessors
...
To allow the asio wrapper to work with boost.fiber it is required
to access the underlying io_service objects.
2015-12-08 15:54:22 +01:00
Tatsuhiro Tsujikawa
7ca9ead36b
nghttp: Update doc for default value of -M
2015-12-04 23:08:58 +09:00
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
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
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
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
c44ee44cc3
nghttpd: Fix compile error due to incomplete FileEntry
2015-11-23 21:25:12 +09:00
Tatsuhiro Tsujikawa
84e23bff10
h2load: clang-format
2015-11-23 20:05:40 +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
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
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
63aa3466e9
nghttpd: Fix crash with CONNECT request
2015-11-21 12:54:04 +09:00
Tatsuhiro Tsujikawa
ab1e8305a1
asio: client: call on_error when connection is dropped
...
When connection is dropped, we get "nonzero" error code ec in
read_socket callback. We can just call on_error callback if ec is
nonzero. But there is a problem when we did ordered shutdown. In
this case, we also get EOF in ec, but we don't want to call on_error
because it is not an error. To workaround this, we check return value
of should_stop(). If it is true, then we assume that HTTP/2 session
cleanly ended, and we don't call on_error.
2015-11-19 00:04:10 +09:00
Tatsuhiro Tsujikawa
8b4f6f1778
nghttpd: Defered eviction of cached fd using timer
...
To make use cache fd more robust manner (e.g. among several
connections), eviction of cached file descriptor now takes place using
timer. The timer is started when there is no handler (no
connections). The timeout value is hard-coded and 2 seconds.
2015-11-18 23:21:57 +09:00
Tatsuhiro Tsujikawa
8c94341c18
h2load: Override user-agent with -H option
...
This commit allows user to override user-agent with -H option. We
also enabled custom header support for http/1.1 requests. We also did
minor optimizations (std::vector::reserve).
2015-11-18 22:25:02 +09:00
Tatsuhiro Tsujikawa
1753bea692
nghttpx: Support server push from HTTP/2 backend
...
This commits enables HTTP/2 server push from HTTP/2 backend to be
relayed to HTTP/2 frontend. To use this feature, --http2-bridge or
--client is required. Server push via Link header field contiues to
work.
2015-11-16 23:12:25 +09:00
Tatsuhiro Tsujikawa
c3459c9e86
nghttpx: Clarify return value of nghttp2_submit_push_promise is stream ID
2015-11-16 21:44:36 +09:00
Tatsuhiro Tsujikawa
fe8720341d
nghttpx: Fix crash on non-final response from backend server
2015-11-13 23:59:36 +09:00
Tatsuhiro Tsujikawa
c6ef1c02b9
Switch to clang-format-3.6
2015-11-13 00:53:29 +09:00
Tatsuhiro Tsujikawa
c711a80411
src: Fix typo
...
Apply typo fixes to the original source files in the previous commit
which were done in generated text.
2015-11-09 21:43:25 +09:00
Tatsuhiro Tsujikawa
dbbed64146
nghttpx: Fix bug that causes connection failure with backend proxy URI
...
This is a regression when we introduced SSL/TLS session resumption in
HTTP/2 backend. Before the introduction of session resumption,
conn_.tls.ssl is always nullptr when connection is made to proxy. But
we have to keep conn_.tls.ssl to enable session resumption, so our
code breaks when it is reused. This commit fixes this issue.
See GH-421
2015-11-09 21:35:53 +09:00
Tatsuhiro Tsujikawa
9b18e47671
nghttpx: Use --backend-tls-sni-field to verify certificate hostname
2015-11-08 00:22:44 +09:00
Tatsuhiro Tsujikawa
b89f1f5869
asio: ALPN support
2015-11-07 22:53:25 +09:00
Tatsuhiro Tsujikawa
eaefce3792
nghttp: Record request method to output it in har correctly
2015-11-07 16:13:06 +09:00
Tatsuhiro Tsujikawa
558934cee5
src: Use nghttp2_session_upgrade2
2015-11-07 16:13:06 +09:00
Tatsuhiro Tsujikawa
6958d0b55d
nghttp: Use method given in -H with ":method" in HTTP Upgrade
2015-11-07 11:14:28 +09:00
Tatsuhiro Tsujikawa
7755c2827c
nghttpx: Reserve headers vector
2015-11-05 23:47:22 +09:00
Tatsuhiro Tsujikawa
ac41946533
nghttpx: Use NGHTTP2_NV_FLAG_NO_COPY_NAME and NGHTTP2_NV_FLAG_NO_COPY_VALUE
...
For both HTTP/2 frontend and backend.
Also adds http2::stringify_status to optimize status code
serialization.
2015-11-05 23:47:11 +09:00
Tatsuhiro Tsujikawa
cb73fa1d3b
h2load: Return SSL_TLSEXT_ERR_NOACK if there is protocol list overlap in NPN
2015-11-05 21:26:38 +09:00
Tatsuhiro Tsujikawa
0dc7fee713
h2load: Print "space savings" to measure header compression efficiency
2015-11-04 01:04:56 +09:00
Tatsuhiro Tsujikawa
be0d0e2995
Rename nghttp2_session_request_allowed as nghttp2_session_check_request_allowed
2015-10-30 22:48:27 +09:00
Tatsuhiro Tsujikawa
1e7f0d833e
nghttpd: Don't show read error if mime types file is not set by user manually
2015-10-29 23:08:52 +09:00
Tatsuhiro Tsujikawa
1c37abc0dd
Add nghttp2_session_request_allowed() API function
...
This function is useful for the client application to know that there
is a chance that request can be sent. If this function returns 0,
there is zero chance to make a request.
This commit also set error_code passed to
nghttp2_on_stream_close_callback to NGHTTP2_REFUSED_STREAM if request
is not sent.
2015-10-29 22:53:30 +09:00
Tatsuhiro Tsujikawa
ad395f0603
h2load: Handle request submission failure
...
If request submission is failed, make all remaining requests for that
client fail.
2015-10-29 22:31:03 +09:00
Tatsuhiro Tsujikawa
e3878b619f
h2load: Update doc
2015-10-29 21:16:47 +09:00
Tatsuhiro Tsujikawa
3641b123f3
h2load: Stream error should be counted toward `errored`
2015-10-29 21:15:22 +09:00
Tatsuhiro Tsujikawa
f29ccc9c20
nghttpd: Read /etc/mime.types to set content-type header field
...
User can change file name using --mime-types-file option.
2015-10-29 00:21:36 +09:00
Tatsuhiro Tsujikawa
ecb4a208fb
nghttpx: Use ev_feed_event to signal write for HTTP backend
...
It seems that using ev_feed_event to signal write operation is much
faster than starting watcher. This is probably due to the fact that
we don't need to wait in event loop. The same thing cannot be done in
HTTP/2 frontend, since this will raise write operation for each stream
HEADER/DATA write, which leads to very small packets, hurting
performance. Interestingly, HTTP/1 frontend also suffers the same
performance hit.
2015-10-28 23:26:41 +09:00
Tatsuhiro Tsujikawa
d9f73c36c3
nghttpx: Log :authority as $http_host if available
2015-10-28 23:12:16 +09:00
Lucas Pardue
76df93fdf4
h2load: do not overwrite protocol value
2015-10-28 11:04:09 +00:00
Tatsuhiro Tsujikawa
1aa8e8cd9f
nghttpx: Simplify add_header
2015-10-28 02:57:31 +09:00
Tatsuhiro Tsujikawa
b051ddec2a
h2load: Show application protocol with OpenSSL < 1.0.2
...
This commit also fixes the problem that application protocol is not
shown if cleartext spdy is used.
2015-10-28 02:40:04 +09:00
Tatsuhiro Tsujikawa
6b0bde6c31
Update doc so that we can use hyperlink to referred options
2015-10-25 17:10:41 +09:00
Tatsuhiro Tsujikawa
9231a4ba57
nghttpx: Replace old script file options with --mruby-file
2015-10-25 17:05:15 +09:00
Tatsuhiro Tsujikawa
0b2c139eaa
clang-format-3.5
2015-10-25 17:04:54 +09:00
Tatsuhiro Tsujikawa
b832caccd4
Fix typo
2015-10-25 11:31:55 +09:00
Tatsuhiro Tsujikawa
907798707c
nghttpx: Fix compile error with Android NDK
2015-10-24 19:31:09 +09:00
Tatsuhiro Tsujikawa
d1b8f60776
nghttp: Allow multiple -c option occurrence, and take min and last value
2015-10-24 18:11:47 +09:00
Tatsuhiro Tsujikawa
7eddf1975e
src: Fix Memchunks move ctor
2015-10-23 01:03:43 +09:00
Tatsuhiro Tsujikawa
d3475f5fe2
nghttp: Remove redundant std::move
2015-10-23 00:17:00 +09:00
Tatsuhiro Tsujikawa
ce74a30990
Use -fvisibility=hidden for internal functions
...
This will improve performance since we can avoid indirect call of
internal functions. The downside is we now require libnghttp2 static
library to run unit tests.
2015-10-23 00:08:15 +09:00
Tatsuhiro Tsujikawa
fad1def7b9
Merge branch 'nghttpx-tls-dyn-rec-config' of https://github.com/LPardue/nghttp2 into LPardue-nghttpx-tls-dyn-rec-config
2015-10-22 23:50:07 +09:00
Lucas Pardue
dcc9aaaa24
Add TLS dynamic record size behaviour command line options
2015-10-22 14:07:18 +00:00
Tatsuhiro Tsujikawa
20ac0e3e48
src: Print out exception type
2015-10-22 01:34:01 +09:00
Tatsuhiro Tsujikawa
e3c95265a4
nghttpd: Fix leak when server failed to listen to given port
2015-10-21 22:27:15 +09:00
Tatsuhiro Tsujikawa
f0bf2233d2
Remove the word "experimental" since HTTP/2 has been finalized
2015-10-20 00:19:49 +09:00
Tatsuhiro Tsujikawa
48edbc8687
nghttpx: Reduce default timeouts for read sockets to 1m
2015-10-18 00:15:58 +09:00
Tatsuhiro Tsujikawa
b9a9e3a596
src: s/custom/unknown/
2015-10-18 00:10:08 +09:00
Tatsuhiro Tsujikawa
eff3dfd50b
src: Move exception handling code to one function
2015-10-17 23:34:05 +09:00
Tatsuhiro Tsujikawa
11cb4ea214
h2load: Don't DOS our server!
2015-10-17 12:04:06 +09:00
Tatsuhiro Tsujikawa
5594e3df25
src: Handle exception in main
2015-10-17 11:52:33 +09:00
Tatsuhiro Tsujikawa
85bc696c38
nghttpx: Add error handling for strdup and sigaction
2015-10-16 22:33:48 +09:00
Tatsuhiro Tsujikawa
54bf225692
clang-format-3.5
2015-10-15 21:42:11 +09:00
Tatsuhiro Tsujikawa
e8c608a4d9
nghttpx: Fix bug that PUT is replaced with POST
2015-10-15 00:57:07 +09:00
Tatsuhiro Tsujikawa
338b4ba739
nghttpx: Don't use units to display fastopen default
2015-10-14 23:45:56 +09:00
Tatsuhiro Tsujikawa
41710bfc7e
nghttpx: Add description about error message when TLS protocols do not overlap
2015-10-14 23:23:43 +09:00
Tatsuhiro Tsujikawa
0e87d464a2
clang-format
2015-10-14 23:23:34 +09:00
Tatsuhiro Tsujikawa
ed1e84fc0a
nghttpx: Improve libssl error logging
2015-10-14 22:32:47 +09:00
Tatsuhiro Tsujikawa
1ca64788eb
h2load: Use duration syntax for timeouts
2015-10-13 23:37:28 +09:00
Tatsuhiro Tsujikawa
47f1d17ad3
h2load: Support subsecond rate period
...
This change adds subsecond rate period support to h2load. Now
--rate-period option only accepts integer, but it can be followed by
units. Currently, h, m, s, and ms are supported, which are hours,
minutes, seconds, and milliseconds respectively. The underlying
functionality and usecase are already extensively used in nghttpx.
2015-10-13 23:35:33 +09:00
Tatsuhiro Tsujikawa
ac317321fc
h2load: Format doc
2015-10-10 11:16:36 +09:00
Tatsuhiro Tsujikawa
ca9e7c2c2d
h2load: Start thread execution using conditional variable
...
When thread is created, we pause them. After all threads are created,
master thread sends signal to all worker threads and let them start to
benchmark. This will make thread start almost at the same time since
we can avoid thread creation overhead. It also exclude thread
creating time from benchmark time. We also simplified thread creation
routine, and now we always use dedicted worker thread to issue
requests even if -t1.
2015-10-10 11:14:55 +09:00
Tatsuhiro Tsujikawa
4030060db8
h2load: Simplify rate mode
...
This change simplifies rate mode as proposed idea as plan B in GH-382.
In this change, we removed -C option. Instead, -c option is used to
specify the number of connections to be made, and it is now required
argument if more than 1 clients are required (this is usually the
case). The number of requests made per connection is calculated
simply by -n / -c.
-n option is handled specially when --timing-script-file is used. If
-n is used with --timing-script, it specifies the number of requests
-each client will make rather than the total number of requests h2load
-will perform across clients. This handling applies to rate mode too.
We also clarified the sematics about distribution of rate among the
threads.
2015-10-10 11:06:44 +09:00
Tatsuhiro Tsujikawa
f1eb7638d1
nghttpx: Change mruby script handling
...
This commit changes nghttpx's mruby script handling. Previously we
have 2 options to specify the mruby script file to be run on request
and on response. Now they are merged into 1 option, namely
--mruby-file. It now must return object. On request, the object's
on_req(env) method is invoked with env object. Similarly, on
response, the object's on_resp(env) method is invoked. The
specification of Env object has not changed.
2015-10-08 23:32:15 +09:00
Tatsuhiro Tsujikawa
c71c357fa6
src: Call OpenSSL_add_all_algorithms to attempt to set up cpuid explicitly
...
See GH-377
2015-10-08 22:50:51 +09:00
Tatsuhiro Tsujikawa
2f4395da22
Merge branch 'h2load-rateperiod' of https://github.com/LPardue/nghttp2 into LPardue-h2load-rateperiod
2015-10-07 22:37:04 +09:00
Lucas Pardue
afa14d36a8
h2load: Add option for user-definable rate period
2015-10-07 11:22:32 +00:00
Peeyush Aggarwal
349f3e2c7b
Added support for RFC 7413 (TCP Fast Open) on nghttpx proxy listening connections.
...
Fixed code as per PR comments
2015-10-05 13:40:45 -07:00
Tatsuhiro Tsujikawa
0155c9115a
nghttpx: Fix so that --padding option works again
2015-10-04 10:36:20 +09:00
Tatsuhiro Tsujikawa
49573e0aa2
Cleanup
2015-10-03 19:14:41 +09:00
Tatsuhiro Tsujikawa
e95b39d534
nghttpx: Fix sent bodylen logging
2015-10-03 19:14:26 +09:00
Tatsuhiro Tsujikawa
ccbaaa1e14
nghttpx: Fix freeze in large transfer
2015-10-03 19:00:16 +09:00
Tatsuhiro Tsujikawa
777e1ee2c5
nghttpx: Use send_data_callback for higher throughput
2015-10-03 17:56:37 +09:00
Tatsuhiro Tsujikawa
da89f9c150
nghttpx: Refactor client handler write
...
Move write buffer to Upstream objects
2015-10-03 11:09:42 +09:00
Tatsuhiro Tsujikawa
fe79b6d118
nghttpx: Avoid last buffer copy when HTTP/1.1 is used
2015-10-01 23:34:17 +09:00
Tatsuhiro Tsujikawa
2aa8d9642c
nghttpx: Fix crash on http2/client proxy mode
2015-09-30 23:45:43 +09:00
Tatsuhiro Tsujikawa
f150f9aec4
Fix compile error without BoringSSL
2015-09-29 23:45:13 +09:00
Tatsuhiro Tsujikawa
22a89ff7a6
Fix compile error and warning with gcc
2015-09-29 23:38:26 +09:00
Tatsuhiro Tsujikawa
f0d2c9f94b
Compile with BoringSSL
...
Compile with BoringSSL except for neverbleed and libnghttp2_asio. The
former uses ENGINE and RSA_METHOD, and they are quite different
between OpenSSL and BoringSSL. The latter uses boost::asio, which
calls OpenSSL functions deleted in BoringSSL.
2015-09-29 23:38:17 +09:00
Tatsuhiro Tsujikawa
49ef571ecf
nghttpx: Stop watchers in ConnectionHandler dtor
2015-09-29 00:45:31 +09:00
Tatsuhiro Tsujikawa
75ff04f87a
nghttpx: Don't stop default loop of worker process on graceful shutdown
...
To keep ipc channel being read from worker process, default loop
should not be stopped. To join all worker threads, now we use
dedicated thread to do this. When all worker threads are joined,
ev_async_send sends message to default loop, and it is finally
stopped.
2015-09-29 00:40:33 +09:00
Tatsuhiro Tsujikawa
3fca142e5f
nghttpx: Exit immediately if IPC channel read failed on worker process
2015-09-29 00:08:46 +09:00
Tatsuhiro Tsujikawa
a28aee058f
nghttpx: Don't need to trap SIGTERM and SIGINT signals
2015-09-29 00:07:29 +09:00
Tatsuhiro Tsujikawa
55075516c9
h2load: Reuse SSL/TLS session
2015-09-28 23:59:42 +09:00
Tatsuhiro Tsujikawa
ff87bf7584
h2load: Fix compile error
2015-09-28 23:57:58 +09:00
Tatsuhiro Tsujikawa
252df2d22c
h2load: Reconnect server on connection: close
2015-09-28 23:50:44 +09:00
Tatsuhiro Tsujikawa
4e2ff875dc
h2load: Don't exit in the case of no ALPN protocol overlap
2015-09-28 22:48:43 +09:00
Tatsuhiro Tsujikawa
3fafbfe1ed
Fix gcc build
2015-09-27 00:51:32 +09:00
Tatsuhiro Tsujikawa
8acf9a2802
nghttpx: Trie based routing
2015-09-26 22:19:10 +09:00
Tatsuhiro Tsujikawa
566b0476d7
nghttpx: Enable neverbleed for client private key; don't run nb without TLS
2015-09-26 21:28:46 +09:00
Tatsuhiro Tsujikawa
044385ab6e
Add neverbleed support
...
neverbleed is disabled by default. To enable it, use
--with-neverbleed configure option.
2015-09-26 19:01:31 +09:00
Tatsuhiro Tsujikawa
c749ae0cac
Add doc
2015-09-26 18:54:38 +09:00
Tatsuhiro Tsujikawa
6680d8b792
nghttpx: Call setsid after executing new binary
2015-09-25 00:55:08 +09:00
Tatsuhiro Tsujikawa
0b32df94a5
nghttpx: Log when worker process exits
2015-09-25 00:11:35 +09:00
Tatsuhiro Tsujikawa
c44587a70c
nghttpx: Use _Exit when exiting from child process
2015-09-24 23:57:24 +09:00
Tatsuhiro Tsujikawa
938fa9a1e2
nghttpx: Fix compile error with --disable-threads
2015-09-24 23:57:06 +09:00
Tatsuhiro Tsujikawa
389a96483a
nghttpx: Fix improper signal handling
2015-09-24 23:43:24 +09:00
Tatsuhiro Tsujikawa
bff59e09dc
src: Robust make_array implementation
...
This is meant to be used for ints, but unfortunately std::forward is
not constexpr in C++11.
2015-09-24 23:43:07 +09:00
Tatsuhiro Tsujikawa
a54062bd5e
nghttpx: Fix output glitch
2015-09-24 00:11:02 +09:00
Tatsuhiro Tsujikawa
2269b99b4f
Merge branch 'unix-tcp-nodelay' of https://github.com/rraptorr/nghttp2 into rraptorr-unix-tcp-nodelay
2015-09-23 19:54:50 +09:00
Janusz Dziemidowicz
84f96a2fd5
Do not try to set TCP_NODELAY when frontend is an UNIX socket
...
This silences warning log that otherwise spams logs on every accepted
connection.
2015-09-23 12:22:34 +02:00
Tatsuhiro Tsujikawa
28fe3e7e89
More warning flags for --enable-werror
2015-09-23 16:49:45 +09:00
Tatsuhiro Tsujikawa
2be6a94d70
nghttpx: Show textual signal description when worker process exited
2015-09-22 21:21:40 +09:00
Tatsuhiro Tsujikawa
e77f9d95d3
nghttpx: Set CLOEXEC for ipc fds
2015-09-22 19:52:35 +09:00
Tatsuhiro Tsujikawa
87a38bdf8d
nghttpx: Chown UNIX domain socket to user specified as --user
2015-09-22 18:34:03 +09:00
Tatsuhiro Tsujikawa
03bb58006b
nghttpx: Extract several chown() usages into 1 function
2015-09-22 18:32:40 +09:00
Tatsuhiro Tsujikawa
ab824d1230
nghttpx: Add missing sys/wait.h
2015-09-19 19:50:29 +09:00
Tatsuhiro Tsujikawa
da9e535c7a
nghttpx: Log worker thread creating in NOTICE level
2015-09-18 23:35:25 +09:00
Tatsuhiro Tsujikawa
dbbc7296f5
strdup is not required here
2015-09-18 23:28:27 +09:00
Tatsuhiro Tsujikawa
ce1b11e3a0
nghttpx: Split monolithic one process into control and worker processes
...
The control process handles signals, reads configuration, reads
private keys, and bind port (which may be privileged one). It never
drop privileges, so that it can execute new binary with the same
privilege. It forks worker process. The worker process handles all
incoming connections. It drops privilege.
2015-09-18 23:28:26 +09:00
Tatsuhiro Tsujikawa
b57b0db5bf
h2load: Fix npn defualt list
2015-09-18 23:03:36 +09:00
Tatsuhiro Tsujikawa
604732b650
Merge branch 'h2load-http1_a' of https://github.com/LPardue/nghttp2 into LPardue-h2load-http1_a
2015-09-18 22:53:29 +09:00
Lucas Pardue
ec47dfb9b8
Initial HTTP/1.1 capability. Add npn-list option to h2load. Make NPN/ALPN more runtime dependent
2015-09-17 14:49:27 +00:00
Tatsuhiro Tsujikawa
1c2fcc2a55
nghttpx: Handle SSL/TLS data following PROXY protocol line
2015-09-17 22:26:49 +09:00
Tatsuhiro Tsujikawa
c6785abd1f
nghttp: Check req is null, found by coverity
2015-09-16 22:18:09 +09:00
Tatsuhiro Tsujikawa
ee4732a676
nghttp: Show error if HEADERS frame cannot be sent for whatever reason
2015-09-16 00:41:55 +09:00
Tatsuhiro Tsujikawa
4aaf111c58
nghttpx: Fix assertion failure on TLS handshake
2015-09-15 23:24:30 +09:00
Tatsuhiro Tsujikawa
d22573086f
nghttpx: Add x-http2-push header field for pushed resource
...
Fixes GH-352
2015-09-14 00:28:19 +09:00
Tatsuhiro Tsujikawa
1148584526
nghttpx: Reserve room for required header fields for PUSH_PROMISE
2015-09-14 00:26:50 +09:00
Tatsuhiro Tsujikawa
33601f1a51
nghttpx: Fix compile error with --disable-threads
2015-09-13 00:42:59 +09:00
Tatsuhiro Tsujikawa
57aee184ca
Update doc
2015-09-12 18:33:07 +09:00
Tatsuhiro Tsujikawa
0d8c8ca033
h2load: Record TTFB on first byte of response body, rather than first socket read
2015-09-12 11:18:54 +09:00
Tatsuhiro Tsujikawa
5ea90ba6bd
nghttpx: Fix crash with signal QUIT if mruby is not initialized
2015-09-12 02:40:55 +09:00
Tatsuhiro Tsujikawa
d0f96da2c0
src: Cleanup
2015-09-12 02:10:07 +09:00
Tatsuhiro Tsujikawa
f086b7b67e
nghttpx: Fix busy loop
2015-09-12 01:22:40 +09:00
Tatsuhiro Tsujikawa
02adaac368
nghttpx: Write h1 header into downstream buffer directly
2015-09-11 23:49:47 +09:00
Tatsuhiro Tsujikawa
753f6d4a3e
src: Fix compiler warning
2015-09-09 21:01:13 +09:00
Tatsuhiro Tsujikawa
aba2dbddc2
nghttpx: Don't allow partial PROXY protocol line
2015-09-09 00:21:54 +09:00
Tatsuhiro Tsujikawa
7d481db248
Merge branch 'nghttpx-proxyprotocol'
2015-09-07 23:52:39 +09:00
Tatsuhiro Tsujikawa
4f52f60b3c
src: Inline some single character categorization functions
2015-09-07 23:28:31 +09:00
Tatsuhiro Tsujikawa
3ce1c1d39f
nghttpx: Add date header field to error_reply and send_reply
2015-09-07 23:11:23 +09:00
Tatsuhiro Tsujikawa
21a3edfc60
nghttpx: Use 's' for param of Response::return
2015-09-07 23:00:01 +09:00
Tatsuhiro Tsujikawa
026ab797eb
src: util::numeric_host: Use inet_pton instead of getaddrinfo
2015-09-07 22:40:37 +09:00
Tatsuhiro Tsujikawa
79945c0c45
nghttpx: Robust PROXY protocol implementation
2015-09-07 22:37:25 +09:00
Tatsuhiro Tsujikawa
f8c1da7f3c
nghttpx: Add --accept-proxy-protocol usage to help message
2015-09-06 23:27:07 +09:00
Tatsuhiro Tsujikawa
a1bb48770c
nghttpx: Add tests for PROXY protocol handling
2015-09-06 23:11:07 +09:00
Tatsuhiro Tsujikawa
d05b77b36c
nghttpx: More logging for PROXY protocol handling
2015-09-06 21:44:45 +09:00
Tatsuhiro Tsujikawa
ce53bd239e
nghttpx: Implement PROXY protocol version 1
...
Use --accept-proxy-protocol to enable PROXY protocol handling
2015-09-06 21:30:19 +09:00
Tatsuhiro Tsujikawa
39287314d3
nghttpx: Fix missing `break`
2015-09-06 18:34:10 +09:00
Tatsuhiro Tsujikawa
c30d252f94
nghttpx: Show warning if certain feature is not compiled in
2015-09-06 16:59:57 +09:00
Tatsuhiro Tsujikawa
1b63e6d478
nghttpx: Call request phase hook for pushed resource as well
2015-09-06 15:21:36 +09:00
Tatsuhiro Tsujikawa
28defbfb4a
nghttpx: Allow link header server push for HTTP/2 backend as well
2015-09-06 15:12:20 +09:00
Tatsuhiro Tsujikawa
1df682140c
nghttpx: Don't do mruby push with --no-server-push option
2015-09-06 00:06:48 +09:00
Tatsuhiro Tsujikawa
ef1595672c
nghttpx: Add Request#push in mruby scripting
...
Refactor Http2Upstream so that we can share code between link header
field based push and mruby push.
2015-09-06 00:05:07 +09:00
Tatsuhiro Tsujikawa
77958eab46
Merge branch 'master' into nghttpx-mruby
2015-09-05 19:04:04 +09:00
Tatsuhiro Tsujikawa
8f41accf41
nghttpx: Don't initiate push if client disabled push
2015-09-05 19:02:55 +09:00
Tatsuhiro Tsujikawa
e19d5efced
nghttpx: Allow absolute URI in Link header field for push
2015-09-05 19:01:02 +09:00
Tatsuhiro Tsujikawa
69c3e2114a
Again fix mruby build properly; pass CC, CXX and LD to build_config.rb
2015-09-05 18:22:46 +09:00
Tatsuhiro Tsujikawa
d076d54f67
nghttpx: Don't add mruby related CPPFLAGS and LDFLAGS if it is disabled
...
Setting unused -L really makes libtool get angry
2015-09-05 18:03:05 +09:00
Tatsuhiro Tsujikawa
aba7e9e7f9
Add mruby as submodule; disable mruby by default for now
2015-09-05 17:49:10 +09:00
Tatsuhiro Tsujikawa
4ac7152f94
nghttpx: Fix build failure without mruby
2015-09-05 01:32:26 +09:00
Tatsuhiro Tsujikawa
b4709b9e8c
nghttpx: Fix crash without mruby script
2015-09-05 01:20:32 +09:00
Tatsuhiro Tsujikawa
21e1af2ae7
nghttpx: Delete replaced header fields
2015-09-05 01:18:18 +09:00
Tatsuhiro Tsujikawa
226a09b04a
nghttpx: Use gc arena save/restore when creating headers hash
2015-09-05 01:14:17 +09:00
Tatsuhiro Tsujikawa
587f37a597
nghttpx: Remove unused includes
2015-09-05 01:12:51 +09:00
Tatsuhiro Tsujikawa
97f488a5c7
nghttpx: Add Env.phase method
2015-09-05 01:11:20 +09:00
Tatsuhiro Tsujikawa
45e0d42c51
nghttpx: Check allowed operations per phase
2015-09-05 01:07:29 +09:00
Tatsuhiro Tsujikawa
bddc4a0a04
nghttpx: Rewrite API; introduce Env object
2015-09-05 00:53:42 +09:00
Tatsuhiro Tsujikawa
a9338f1c0e
nghttpx: Fix hang when error page is sent on response phase hook error
2015-09-04 22:34:40 +09:00
Tatsuhiro Tsujikawa
4ad00200a2
Merge branch 'master' into nghttpx-mruby
2015-09-04 22:22:06 +09:00
Tatsuhiro Tsujikawa
6b38f7e0d2
nghttpx: Fix crash with multi workers and QUIT signal
2015-09-04 22:21:10 +09:00
Tatsuhiro Tsujikawa
d8ca0a8d47
nghttpx: Add clear_headers and add_header methods to Request and Response
2015-09-04 02:53:02 +09:00
Tatsuhiro Tsujikawa
9e685a2734
nghttpx: Various test failures
2015-09-04 02:47:25 +09:00
Tatsuhiro Tsujikawa
d722a09581
nghttpx: Rename mruby script options
2015-09-04 01:19:57 +09:00
Tatsuhiro Tsujikawa
5967667e9e
nghttpx: Allow empty path assignment in mruby code
2015-09-04 01:00:27 +09:00
Tatsuhiro Tsujikawa
d044c58558
nghttpx: Detect mruby presence and guard mruby related code with ifdef
2015-09-04 00:54:41 +09:00
Tatsuhiro Tsujikawa
200217d8ea
nghttpx: Store empty string to path for server-wide OPTIONS request
...
This change is required to show path attribute to mruby script. It is
desirable to construct URI from parts. Just checking method and path
is "*" is awkward.
2015-09-04 00:14:09 +09:00
Tatsuhiro Tsujikawa
02bb2c3e83
nghttpx: Create authority from host or authority-form for CONNECT request
2015-09-03 23:36:49 +09:00