Tatsuhiro Tsujikawa
a053d10839
nghttpx: Move option handling code to separate function
2016-01-18 17:08:28 +09:00
Tatsuhiro Tsujikawa
16549bb276
nghttpx: Structured configurations for http and http2
2016-01-18 17:00:20 +09:00
Tatsuhiro Tsujikawa
f3e1dc7a4f
nghttpx: Structured TLS related configurations
2016-01-18 14:21:09 +09:00
Tatsuhiro Tsujikawa
b12af8c410
nghttpx: Refactor backend proxy configuration
2016-01-17 22:51:40 +09:00
Tatsuhiro Tsujikawa
f5b4fd23da
src: Fix compiler error on travis
2016-01-17 22:47:50 +09:00
Tatsuhiro Tsujikawa
ee43250015
nghttpx: Remove useless comment
2016-01-17 22:26:13 +09:00
Tatsuhiro Tsujikawa
9f0f5c60ad
ImmutableString: Remove std::unique_ptr<char[]> ctor overload
2016-01-17 22:25:10 +09:00
Tatsuhiro Tsujikawa
09de332028
ImmutableString: Less fields
2016-01-17 22:25:10 +09:00
Tatsuhiro Tsujikawa
3d5f5b6a28
nghttpx: Fix compiler warning
2016-01-17 18:27:25 +09:00
Tatsuhiro Tsujikawa
eb7b3295d1
ImmutableString, StringRef: Add empty() and operator[]
...
We won't add operator[] to StringRef. This is because it may be
undefined if pos == size(), and StringRef's base + len does not point
to the valid region. This solely depends on the given buffer, so we
cannot do anything to fix. For workaround, if we need this kind of
operator, we may add it under another name, like char_at(size_type).
2016-01-17 18:09:12 +09:00
Tatsuhiro Tsujikawa
5131b95c2f
ImmutableString: Ensure that c_str() returns non-nullptr if it is default constructed
2016-01-17 18:00:36 +09:00
Tatsuhiro Tsujikawa
ba543e3895
memchunk: Add noexcept
2016-01-17 17:16:20 +09:00
Tatsuhiro Tsujikawa
ef5d981ab1
nghttpx: Simplify
2016-01-17 17:04:16 +09:00
Tatsuhiro Tsujikawa
d5efab4993
src: Add inequality operator for StringRef
2016-01-17 16:42:19 +09:00
Tatsuhiro Tsujikawa
919e9eee63
nghttpx: It is enough to check "chunked" in the suffix
2016-01-17 16:34:56 +09:00
Tatsuhiro Tsujikawa
e255468bdf
nghttpx: Fix tests
2016-01-17 16:33:23 +09:00
Tatsuhiro Tsujikawa
39c0a71065
src: Add tests for ImmutableString and StringRef
2016-01-17 16:32:55 +09:00
Tatsuhiro Tsujikawa
7b2d4b6ae6
nghttpx: Optimize logging further
2016-01-17 15:04:09 +09:00
Tatsuhiro Tsujikawa
4f07db8bcb
src: Rename our new string classes
2016-01-17 11:33:45 +09:00
Tatsuhiro Tsujikawa
959d378f2a
nghttpx: Optimize accesslog write
2016-01-17 11:19:19 +09:00
Tatsuhiro Tsujikawa
506de55475
src: Less strlen
2016-01-17 01:29:52 +09:00
Tatsuhiro Tsujikawa
045578989c
src: Update doc
2016-01-17 01:21:58 +09:00
Tatsuhiro Tsujikawa
d16ff1f519
nghttpx: Use StringAdaptor for Config::server_name
2016-01-17 01:15:11 +09:00
Tatsuhiro Tsujikawa
2c7ed01f0c
nghttpx: Use std::string for Downstream::backend_tls_sni_name
2016-01-17 01:00:15 +09:00
Tatsuhiro Tsujikawa
34d5382d66
nghttpx: Use VString for DownstreamAddr::host and hostport to remember size
2016-01-17 00:52:41 +09:00
Tatsuhiro Tsujikawa
dbbf3a4a10
nghttpx: Refactor TLS hostname match
2016-01-16 23:54:21 +09:00
Tatsuhiro Tsujikawa
f25fd09bbb
nghttpx: Don't emit :authority if request dones not contain authority info
...
RFC 7540 says that proxy should not emit :authority when translating
HTTP/1 request in origin or asterisk form to HTTP/2. To keep this
semantics in tact, we should also refrain from emitting :authority if
it is missing (host header field is required in this case).
2016-01-16 21:12:51 +09:00
Tatsuhiro Tsujikawa
7be0217bc0
nghttpx: Simplify xff handling
2016-01-16 16:48:41 +09:00
Tatsuhiro Tsujikawa
b202e066fd
nghttpx: Don't allow certain characters in host and :scheme header field
...
For HTTP/2, we do this validation in libnghttp2. http-parser does
this partially, when it parses URI, but it does not do anything for
Host header field. libspdylay does not perform anything. So do some
additional validation for HTTP/1 and SPDY cases. integration tests
were also added to make sure they work.
2016-01-16 16:00:05 +09:00
Tatsuhiro Tsujikawa
74c77926a8
nghttpx: Refactor and simplify Downstream::rewrite_location_response_header
2016-01-16 12:49:18 +09:00
Tatsuhiro Tsujikawa
25570367b3
nghttpx: Document Forwarded related options
2016-01-16 11:58:02 +09:00
Tatsuhiro Tsujikawa
4c884da222
nghttpx: Reset config when Forwarded related option is used
2016-01-16 11:53:18 +09:00
Tatsuhiro Tsujikawa
41047aece0
nghttpx: Implement Forwarded in HTTP/2 backend
2016-01-16 11:32:36 +09:00
Tatsuhiro Tsujikawa
54f5ea9d6e
Update doc
2016-01-16 11:32:36 +09:00
Tatsuhiro Tsujikawa
d678c07ddf
nghttpx: Allow user to specify static obfuscated value via command-line
2016-01-16 11:32:26 +09:00
Tatsuhiro Tsujikawa
5c3f74b424
nghttpx: Add RFC 7239 Forwarded header field support
2016-01-16 11:32:14 +09:00
Tatsuhiro Tsujikawa
1550d709e0
nghttpx: Use std::mt19937 instead of std::random_device directly
2016-01-15 18:48:14 +09:00
Tatsuhiro Tsujikawa
3c7038dfe1
nghttpx: Simplify
...
We only change req_.upgrade_request once, so just using else is
suffice.
2016-01-15 00:22:11 +09:00
Tatsuhiro Tsujikawa
f8472f4709
nghttpx: Remove backend priority handling code
...
Currently, this does not do anything useful.
2016-01-15 00:17:40 +09:00
Tatsuhiro Tsujikawa
698f00596d
Update doc
2016-01-15 00:05:56 +09:00
Tatsuhiro Tsujikawa
5a8cf94361
nghttpx: Refactor Downstream::response_sent_bodylen_
2016-01-14 23:54:28 +09:00
Tatsuhiro Tsujikawa
3218c160be
nghttpx: Refactor Downstream::response_datalen_
2016-01-14 23:49:21 +09:00
Tatsuhiro Tsujikawa
fa31d0940c
nghttpx: Refactor Downstream::request_datalen_
2016-01-14 23:36:47 +09:00
Tatsuhiro Tsujikawa
e7e52b11ce
nghttpx: Refactor Downstream::response_bodylen_
2016-01-14 23:20:44 +09:00
Tatsuhiro Tsujikawa
bdef0e0b1a
nghttpx: Refactor Downstream::request_bodylen_
2016-01-14 23:14:58 +09:00
Tatsuhiro Tsujikawa
0a76b45eca
nghttpx: Fix bug that key_prev is not updated
2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa
6d6a00f1f5
nghttpx: Return assemble cookie on the fly
2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa
3b8889a2a1
nghttpx: Extract response related fields to Response struct
2016-01-14 01:05:10 +09:00
Tatsuhiro Tsujikawa
a7fd37ffdf
nghttpx: Remove FieldStore::set_last_{header,trailer}_value
...
Use FieldStore::append_last_{header,trailer}_value instead.
2016-01-14 01:04:53 +09:00
Tatsuhiro Tsujikawa
919f08eb38
nghttpx: Extract request related fields to Request struct
...
Header field related functions are now gathered into FieldStore class.
This commit only handles request. Subsequent commit will do the same
thing for response.
2016-01-14 01:04:32 +09:00
Vernon Tang
6fddefe252
shrpx_worker_process: worker_process_event_loop: Fix FD test.
...
This fixes a crash in nghttpx when running on IPv6 only.
2016-01-12 17:38:17 +00:00
Tatsuhiro Tsujikawa
fe8005327a
src: Make util::utos_with_unit and utos_with_funit names shorter
2016-01-11 18:12:31 +09:00
Tatsuhiro Tsujikawa
0697de4691
h2load: Improve readability of traffic numbers
2016-01-11 18:06:26 +09:00
Tatsuhiro Tsujikawa
6566ea7d6b
nghttpx: Update doc
2016-01-11 17:36:47 +09:00
Tatsuhiro Tsujikawa
0caefe20ef
Merge branch 'master' into simple-extensions
2016-01-09 19:08:28 +09:00
Tatsuhiro Tsujikawa
b64fc3ac49
nghttpd: Add --no-content-length option to omit content-length in response
2016-01-07 22:51:47 +09:00
Tatsuhiro Tsujikawa
027256d0b1
h2load: Distribute MAX_SAMPLES across workers
2016-01-07 22:41:37 +09:00
Tatsuhiro Tsujikawa
425c794f89
h2load: Rename MAX_STATS as MAX_SAMPLES
2016-01-07 22:21:39 +09:00
Tatsuhiro Tsujikawa
acac5ec6ea
h2load: Remove "auto" for -m option
...
Because http/1.1 support, default "auto" behaviour of -m option is not
desirable, since it is used as HTTP pipelining, and it is not used in
practice.
2016-01-06 23:16:53 +09:00
Tatsuhiro Tsujikawa
13bd566eb7
h2load: Remove RequestStat ctor
2016-01-06 23:10:46 +09:00
Tatsuhiro Tsujikawa
a52920cec0
h2load: Perform Sampling for client as well
2016-01-06 23:03:37 +09:00
Tatsuhiro Tsujikawa
9cbb8174bb
h2load: Refactor systematic sampling method
2016-01-06 22:43:09 +09:00
Tatsuhiro Tsujikawa
23ac0429be
h2load: Show progress in rate mode
2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa
7ed26afe75
h2load: Delete Client when it finished
2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa
60bbb5cae0
h2load: Perform sampling for request timings to reduce memory consumption
2016-01-06 00:04:14 +09:00
Tatsuhiro Tsujikawa
2f50bc1b3c
nghttpx: Take into account of trailers when applying max_header_fields
2016-01-05 16:47:44 +09:00
Tatsuhiro Tsujikawa
848f8fbe54
nghttpx: Don't apply max_header_fields and header_field_buffer limit to response
...
We modeled max_header_fields and header_field_buffer limit from Apache
configuration directives. In Apache, they are only applied to request
header fields, while we applied both request and response. Since
nghttpx is used as reverse proxy and backend server is relatively
"trusted", this commit removes the application to response header
fields.
2016-01-05 16:44:44 +09:00
Tatsuhiro Tsujikawa
dd4d549dc1
asio: Rename http2::get_io_services() as http2::io_services()
...
The naming convention in asio lib does not use get_something.
2015-12-25 21:06:25 +09:00
Tatsuhiro Tsujikawa
486dba8d8a
nghttpx: Strict validation for header fields given in configuration
2015-12-25 20:57:24 +09:00
ayanamist
5ec6066fdd
header value should not be inp_strlower
...
http header keys are case-insensitive, but header values are case-sensitive, so it should not be changed.
2015-12-25 11:03:55 +08:00
Tatsuhiro Tsujikawa
8919c8c139
Check initgroups with AC_CHECK_DECLS for cygwin
2015-12-24 21:15:46 +09:00
Tatsuhiro Tsujikawa
5de2c7a8c1
Detect availability of initgroups
2015-12-23 14:21:31 +09:00
Tatsuhiro Tsujikawa
7c5ef0613d
asio: Add configurable connect/read timeout for client
...
This commit includes backward incompatible change, since we change
private field in public API class.
2015-12-23 00:08:55 +09:00
Tatsuhiro Tsujikawa
1ee1122d40
asio: Add configurable tls handshake/read timeout to server
2015-12-23 00:08:16 +09:00
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
9c84f60ba0
Merge branch 'master' into simple-extensions
2015-12-04 23:48:40 +09: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
eb4e402aae
Merge branch 'master' into simple-extensions
2015-11-14 22:31:52 +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
5d611d2e24
Merge branch 'master' into simple-extensions
2015-10-29 23:24:34 +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
3785cf07ba
Add simple HTTP/2 extension framework
...
Application can utilize this framework to send/receive user defined
extension frames. These frames are expected not to change existing
protocol behaviour.
2015-10-11 17:46:23 +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
Tatsuhiro Tsujikawa
ad65121496
nghttpx: Fix assertion error because of empty scheme
2015-09-03 22:52:33 +09:00
Tatsuhiro Tsujikawa
3235b88253
nghttpx: Fix assertion error because of empty scheme
2015-09-03 22:51:24 +09:00
Tatsuhiro Tsujikawa
5e3ab6da5a
nghttpx: Perhaps this looks right, but not sure
2015-09-03 22:44:41 +09:00
Tatsuhiro Tsujikawa
6f9c9f8518
nghttpx: Fix assertion failure when response was commited early
2015-09-03 22:41:51 +09:00
Tatsuhiro Tsujikawa
65f2b16132
nghttpx: More freedom for custom response headers
2015-09-03 22:29:16 +09:00
Tatsuhiro Tsujikawa
05a761b628
nghttpx: Add Request.remote_addr which returns client remote address
2015-09-03 02:02:28 +09:00
Tatsuhiro Tsujikawa
14f5240d8f
nghttpx: Update doc
2015-09-03 01:37:47 +09:00
Tatsuhiro Tsujikawa
baadec5ef4
nghttpx: Add response mruby hook
2015-09-03 01:33:52 +09:00
Tatsuhiro Tsujikawa
d20229d9b9
nghttpx: Handle block is not passed
2015-09-03 00:43:42 +09:00
Tatsuhiro Tsujikawa
e06af02573
nghttpx: Add Response mruby object
2015-09-03 00:40:14 +09:00
Tatsuhiro Tsujikawa
5cd34920b7
nghttpx: Add Request class accessors
2015-09-02 23:22:33 +09:00
Tatsuhiro Tsujikawa
e436caf0bb
nghttpx: Don't forward request if response was commited in mruby hook
2015-09-02 23:22:26 +09:00
Tatsuhiro Tsujikawa
f0d41a5ac2
nghttpx: Handle nil given to request.set_header as value
2015-09-02 22:41:48 +09:00
Tatsuhiro Tsujikawa
068529586d
nghttpx: Split up request class definition to dedicated files
2015-09-02 22:38:57 +09:00
Tatsuhiro Tsujikawa
45cdb10c46
nghttpx: Use ruby block to run request hook
2015-09-02 22:25:04 +09:00
Tatsuhiro Tsujikawa
2170d958d5
nghttpx: Return copied string for safety
2015-09-02 21:14:49 +09:00
Tatsuhiro Tsujikawa
9d78691936
nghttpx: Fix copy-and-paste bug
2015-09-02 21:14:20 +09:00
Tatsuhiro Tsujikawa
1508c50a45
nghttpx: Add basic infrastructure for mruby support
2015-09-02 02:45:15 +09:00
Tatsuhiro Tsujikawa
e7bc269e97
Merge branch 'master' into LPardue-issue-339
2015-09-02 02:35:36 +09:00
Tatsuhiro Tsujikawa
e2557059e5
h2load: Fix crash with --timing-script option
2015-09-02 02:34:32 +09:00
Tatsuhiro Tsujikawa
0c4e26fd24
Merge branch 'issue-339' of https://github.com/LPardue/nghttp2 into LPardue-issue-339
2015-09-02 02:24:10 +09:00
Lucas Pardue
3002674bac
h2load: Improve checking for timing script imput, prevent false positive in certain situations
2015-09-01 17:15:41 +00:00
Tatsuhiro Tsujikawa
e1f7643c92
nghttpx: Fix memory leak
2015-09-02 02:07:29 +09:00
Tatsuhiro Tsujikawa
d70eb14ce0
nghttpx: Drop connection before TLS finish if h2 requirement is not fulfilled
2015-08-31 23:30:40 +09:00
Tatsuhiro Tsujikawa
36d562927f
nghttpx: Use nghttp2::ssl::DEFAULT_CIPHER_LIST for backend TLS connection
2015-08-23 23:03:29 +09:00
Tatsuhiro Tsujikawa
4a99853021
nghttpd: Fix crash without SSL/TLS
2015-08-21 22:50:15 +09:00
Tatsuhiro Tsujikawa
4b4a0f7492
nghttpd: GOAWAY if SSL/TLS requirements for HTTP/2 are not met
2015-08-20 21:21:56 +09:00
Tatsuhiro Tsujikawa
1006caf8e9
Merge branch 'master' of https://github.com/thinred/nghttp2 into thinred-master
2015-08-20 19:11:07 +09:00
Tatsuhiro Tsujikawa
780a0381ba
h2load: Exit if --timing-script and -r option is used together
2015-08-20 19:07:03 +09:00
Tatsuhiro Tsujikawa
2423b21c71
Merge branch 'issue-332' of https://github.com/LPardue/nghttp2 into LPardue-issue-332
2015-08-20 18:53:10 +09:00
Lucas Pardue
08bf8a8f1a
Move input file validation. Timing script auto nreqs scale correctly with nclients.
2015-08-19 15:23:43 +00:00
Tatsuhiro Tsujikawa
1c12606e70
nghttpx: Don't allow blacked listed cipher suites for HTTP/2 connection
2015-08-19 23:42:43 +09:00
Tatsuhiro Tsujikawa
836b1de0d5
h2load: Remove trailing white spaces
2015-08-19 21:19:42 +09:00
Tatsuhiro Tsujikawa
12cecaa030
h2load: Remove trailing spaces and left conflict marker
2015-08-19 00:32:11 +09:00
Lucas Pardue
cd4758227d
Add Timing-script and base URI support
2015-08-18 15:16:50 +00:00
Tatsuhiro Tsujikawa
9da6c88d25
h2load: Use ev_timer_init
2015-08-18 21:34:33 +09:00
Tatsuhiro Tsujikawa
04aaaa3821
h2load: Remove trailing white spaces
2015-08-18 21:32:47 +09:00
Nora
727ba4906c
h2load adding timeout options
2015-08-18 01:52:22 -04:00
Tatsuhiro Tsujikawa
627d04fe6b
nghttpd: Return date header field for 304
2015-08-17 23:49:01 +09:00
Tatsuhiro Tsujikawa
165cab7a29
nghttpd: Support HEAD request
2015-08-17 23:47:35 +09:00
Tatsuhiro Tsujikawa
8ce8b2af46
src: Remove unused Memchunk::shrink
2015-08-15 00:57:58 +09:00
Tatsuhiro Tsujikawa
b37834c584
h2load: Use default Config values to show help
2015-08-14 23:22:26 +09:00
Tatsuhiro Tsujikawa
d197d115dc
h2load: Use floating point duration cast
2015-08-14 22:44:14 +09:00
nshoemaker
e1621584fa
Fixing -r > -n check for when -n is not specified.
2015-08-13 05:09:40 -07:00
Tomasz Buchert
97566ce4e3
nghttpx: make early copy of stderr
2015-08-13 11:01:37 +02:00
Tomasz Buchert
900dcf4ced
nghttpx: remove Android-specific code
2015-08-12 20:17:03 +02:00
Tomasz Buchert
06a0f3480e
nghttpx: better handle /dev/stderr and /dev/stdout
2015-08-12 20:16:57 +02:00
Tatsuhiro Tsujikawa
473311269d
nghttpx: Drop connection if client TLS handshake packet is too large
2015-08-13 01:24:59 +09:00
Tatsuhiro Tsujikawa
b8f05c89bd
nghttpx: App data in SSL is Connection, not ClientHandler
2015-08-13 00:42:59 +09:00
Tatsuhiro Tsujikawa
e91a576179
nghttpx: Rewrite TLS async handshake using memchunk buffers
2015-08-13 00:42:59 +09:00
Tatsuhiro Tsujikawa
2277cc771a
Merge branch 'openssl_no_ec' of https://github.com/yuki-kodama/nghttp2 into yuki-kodama-openssl_no_ec
2015-08-13 00:32:15 +09:00
Tatsuhiro Tsujikawa
f8c30d0229
nghttpx: Fix heap-use-after-free
2015-08-12 21:14:18 +09:00
yuuki-kodama
53b5ffa103
Guard ecdh use with !OPENSSL_NO_EC @asio_server_tls_context.cc
2015-08-12 15:32:54 +09:00
Tatsuhiro Tsujikawa
b384b76f66
nghttpx: Fix hmac_keylen should be 16 for aes-128-cbc
2015-08-12 00:38:07 +09:00
Tatsuhiro Tsujikawa
b406d2da9e
h2load: Stop timeout_watcher in Worker dtor
2015-08-11 23:51:08 +09:00
Tatsuhiro Tsujikawa
dd97b53554
h2load: Fix division by zero if -r > -n
2015-08-11 23:49:34 +09:00
Tatsuhiro Tsujikawa
0f7e84bb62
h2load: Always initialize timeout_watcher
2015-08-11 23:44:22 +09:00
Tatsuhiro Tsujikawa
81add96b1e
src: Fix bug in get_uint64
2015-08-11 23:42:32 +09:00
Tatsuhiro Tsujikawa
020e66b9da
nghttpx: Start read watcher after handshake
2015-08-11 23:14:48 +09:00
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
Tatsuhiro Tsujikawa
ee4d53a9e4
More constexpr
2015-05-31 18:44:37 +09:00
Tatsuhiro Tsujikawa
3d59c6c0b7
nghttpx: Use defined string iteral when defining long_options
2015-05-29 22:48:46 +09:00
Tatsuhiro Tsujikawa
34efc6b7a4
More constexpr
2015-05-29 22:36:05 +09:00
Tatsuhiro Tsujikawa
7582640fd5
nghttpx: Remove unused
2015-05-29 22:20:46 +09:00
Tatsuhiro Tsujikawa
323fc8c552
nghttpx: Make WebSocket upgrade work
...
This commit makes sure that WebSocket upgrade works for HTTP/1.1
frontend and backend pair. Actually, this implementation probably
supports other upgrade as well, other than HTTP/2 Upgrade, which is
handled specially in other place.
2015-05-26 22:26:17 +09:00
Tatsuhiro Tsujikawa
326b4c467b
nghttpx: Fix bug that END_STREAM is not set in backend for POST with Upgrade
2015-05-26 00:00:11 +09:00
Tatsuhiro Tsujikawa
7e51a87111
nghttpx: Don't upgrade to HTTP/2 if we have non-final HTTP/1 response pending
2015-05-25 23:59:44 +09:00
Tatsuhiro Tsujikawa
5fdb36239a
nghttpx: Don't send Expect header field twice
2015-05-25 23:59:18 +09:00
Tatsuhiro Tsujikawa
90eac0709d
src: Make sure that empty param is error when parsing Link header field
2015-05-24 15:40:16 +09:00
Tatsuhiro Tsujikawa
791660ef8d
Fix up OpenSSL initialization
...
Use the example presented at
http://en.wikibooks.org/wiki/OpenSSL/Initialization
2015-05-23 00:23:38 +09:00
Tatsuhiro Tsujikawa
9a0b9428da
nghttpx: Fill request scheme in upstream
...
We may log before filling scheme in Downstream, so we leave
construct_absolute_request_uri as is.
2015-05-22 02:22:59 +09:00
Tatsuhiro Tsujikawa
b20abfc11a
nghttpx: Allow HTTP Upgrade from POST request if response header was not sent
2015-05-22 01:59:40 +09:00
Tatsuhiro Tsujikawa
890a10b216
nghttpx: Fix bug that PUSH_PROMISE is sent after associated response HEADERS
2015-05-22 00:53:02 +09:00
Tatsuhiro Tsujikawa
28adb2dad3
h2load: Fix bug that NPN fails if ALPN is enabled
2015-05-22 00:48:32 +09:00
Tatsuhiro Tsujikawa
fe752174a9
nghttpd: Close connection after settings timeout and GOAWAY was sent
2015-05-18 21:38:12 +09:00
Tatsuhiro Tsujikawa
0b27f005e0
Merge branch 'master' into v1.0.0
...
Conflicts:
src/HttpServer.cc
2015-05-15 23:24:19 +09:00
Tatsuhiro Tsujikawa
3572e7c634
inflatehd: Fix crash if 'wire' value is not string
...
Fixes GH-235
2015-05-15 22:29:57 +09:00
Tatsuhiro Tsujikawa
0479f833fc
Revert "nghttpx: Remove last write/read fields for TLS"
...
This reverts commit 585af93828
.
2015-05-15 22:20:15 +09:00
Tatsuhiro Tsujikawa
53bfc70c9e
Include inttypes.h (or cintypes for C++) instead of stdint.h
...
From autoconf manual, section 5.6.1 Portability of Headers, says:
"""
The C99 standard says that inttypes.h includes stdint.h, so there's no
need to include stdint.h separately in a standard environment. Some
implementations have inttypes.h but not stdint.h (e.g., Solaris 7),
but we don't know of any implementation that has stdint.h but not
inttypes.h.
"""
2015-05-14 00:17:45 +09:00
Tatsuhiro Tsujikawa
38cfc5c47c
Check more headers and funcs
2015-05-13 23:29:20 +09:00
Tatsuhiro Tsujikawa
5da49989f8
nghttpd: Add --echo-upload option to send back request body
2015-05-13 00:38:28 +09:00
Tatsuhiro Tsujikawa
2f2a7ace81
Fix corresponding upstream source reported in previous commits accordingly
2015-05-12 23:24:18 +09:00
Tatsuhiro Tsujikawa
a8625e15f0
clang-format
2015-05-08 19:24:17 +09:00
Tatsuhiro Tsujikawa
e63d6e490a
Merge branch 'master' into v1.0.0
...
Conflicts:
lib/nghttp2_option.h
lib/nghttp2_session.h
src/HttpServer.cc
2015-05-08 19:21:51 +09:00
Tatsuhiro Tsujikawa
2d5d9d5d04
nghttpd: Add -m, --max-concurrent-streams option
2015-05-06 10:42:43 +09:00
Tatsuhiro Tsujikawa
7ecca39025
nghttpx: Fix heap-use-after-free bug in http/1 frontend
...
This is a regression introduced in
4be4d875f3
2015-05-05 23:45:39 +09:00
Tatsuhiro Tsujikawa
4be4d875f3
nghttpx: Log absolute URI for HTTP/2 or client proxy request
2015-05-04 23:24:33 +09:00
Tatsuhiro Tsujikawa
1ab707713f
nghttpx: Accept reference instead of pointer by upstream_accesslog
2015-05-04 22:45:34 +09:00
Tatsuhiro Tsujikawa
cc46d363c5
h2load: Refactor statistics hanlding to scale more upcoming new metrics
2015-05-04 22:36:21 +09:00
Tatsuhiro Tsujikawa
016d40ea0f
Merge branch 'include_pull_request' of https://github.com/alex-nalivko/nghttp2 into alex-nalivko-include_pull_request
2015-05-03 16:50:52 +09:00
Tatsuhiro Tsujikawa
b4e8bea4b5
clang-format
2015-05-03 16:47:32 +09:00
Tatsuhiro Tsujikawa
555d5abac9
Merge branch 'finer_stats' of https://github.com/ericcarlschwartz/nghttp2 into ericcarlschwartz-finer_stats
2015-05-03 16:37:02 +09:00
Alex Nalivko
3137dc4a70
h2load_spdy_session errno include
2015-05-02 19:33:04 +00:00
es
4bba4bf66c
update h2load to give connect time and ttfb stats
...
finer statistics for h2load: update per comments from tatsuhiro-t
finer stats for h2load: fixed formatting
2015-05-01 10:30:09 -07:00
Tatsuhiro Tsujikawa
9dc5259593
nghttpx: Take into account request URI in header size in https frontend
2015-04-29 22:23:25 +09:00
Tatsuhiro Tsujikawa
ea8a566d98
nghttpx: Send 431 if header field size exceeded the configuration limit
2015-04-29 21:39:46 +09:00
Tatsuhiro Tsujikawa
8c6f9e899f
nghttpx: Enforce header field buffer limit for SPDY frontend
2015-04-29 21:27:36 +09:00
Tatsuhiro Tsujikawa
552f675466
nghttpx: Add --header-field-buffer and --max-header-fields options
2015-04-29 21:10:59 +09:00
Tatsuhiro Tsujikawa
1c4df1832b
Update doc, mainly for RFC numbers
2015-04-28 23:05:00 +09:00
Tatsuhiro Tsujikawa
1ad1fe6005
Merge branch 'master' into v1.0.0
2015-04-28 22:48:34 +09:00
Tatsuhiro Tsujikawa
f05a4830c5
nghttp: Fix assertion error if very large value is given to -t
2015-04-28 21:51:28 +09:00
Tatsuhiro Tsujikawa
b41835f19b
h2load: Effectively disable flow control by setting large window size
...
Previously h2load used default flow control window as described in
HTTP/2 and SPDY specification. The window size is 64KiB, which is a
bit small, and cannot utilize full server performance when response
size is not too small. Basically, we do this kind of benchmarking
test to measure server's throughput, and optimal performance. Smaller
window certainly degrades performance even in local testing because
server is so fast that it has to wait for WINDOW_UPDATE from h2load.
To make default behaviour suitable for peak performance test, we
decided to disable flow control in h2load by setting large enough
window size.
Most users used h2load without -w or -W options, so they were
implicitly throttled by flow control and the result was affected by
that negatively. Now flow control is disabled by default, the result
may improve depending on the implementations.
2015-04-27 21:23:01 +09:00
Tatsuhiro Tsujikawa
eb05777d88
clang-format
2015-04-24 00:17:13 +09:00
Tatsuhiro Tsujikawa
db4a68454a
Merge branch 'master' into v1.0.0
...
Conflicts:
lib/includes/nghttp2/nghttp2.h
2015-04-24 00:13:15 +09:00
Tatsuhiro Tsujikawa
77c556901c
nghttpx: Increase maximum header field set size
2015-04-22 22:27:48 +09:00
Tatsuhiro Tsujikawa
4928959213
asio: Document asynchronous parameter for listen_and_serve
2015-04-22 22:25:16 +09:00
Xiaoguang Sun
92a1ca5917
Graceful shutdown and joinable server
2015-04-22 17:51:28 +08:00
Tatsuhiro Tsujikawa
5937b4b6f7
Merge branch 'master' into v1.0.0
2015-04-19 23:13:38 +09:00
Tatsuhiro Tsujikawa
102ea7c0bb
nghttpd: Cache fd
...
Implement fd caching for static files. The response body for such as
404 was dynamically generated previously, but now it is written in
temporally file and its fd is cached. Currently, cache is reference
counted and expired when count becomes 0. This makes caching is not
effective other than "busy" period, but we don't need this feature if
we are not busy.
2015-04-19 17:38:06 +09:00
Tatsuhiro Tsujikawa
c4e994c97d
nghttp: Add --no-push option to disable server push
2015-04-17 23:35:16 +09:00
Tatsuhiro Tsujikawa
0b41e20d54
nghttp: Show stream ID in statistics output
2015-04-17 23:35:16 +09:00
Tatsuhiro Tsujikawa
436595df98
nghttp: Remove --dep-idle option
...
In this commit, we made --dep-idle behaviour by default. This is
because the previous default behaviour is not reflect current usage of
dependency priority and never will be because of fragility of tree due
to stream closure.
2015-04-17 22:24:06 +09:00
Tatsuhiro Tsujikawa
d3561a63b1
nghttp: Depend on "leader" anchor if js is linked inside head element
2015-04-17 21:25:31 +09:00
Tatsuhiro Tsujikawa
e23225689f
nghttp: Use same priority anchor nodes as Firefox does
2015-04-16 23:56:37 +09:00
Tatsuhiro Tsujikawa
8f4e2d941f
Revert accidental change in nghttp.cc
2015-04-16 22:58:25 +09:00
Tatsuhiro Tsujikawa
dc335b9025
Improve weight handling a bit
2015-04-16 21:38:13 +09:00
Tatsuhiro Tsujikawa
82e2c5bd22
Never index authorization and small cookie header field
...
nghttp2 library now use Literal Header Field never Indexed for
"authorization" header field and small "cookie" header field,
regardless of nghttp2_nv.flags.
2015-04-15 23:58:56 +09:00
Tatsuhiko Kubo
59f8397659
Use nullptr instead of NULL in C++.
2015-04-15 21:18:39 +09:00
Tatsuhiko Kubo
061732adf0
improved malloc error handlings.
2015-04-15 09:20:45 +09:00
Tatsuhiro Tsujikawa
5c2ca28706
asio: client: Call error_cb on error occurred in do_read and do_write
...
Fixes GH-207
2015-04-13 21:33:43 +09:00
Tatsuhiro Tsujikawa
a8ea86cfe5
src: constexpr
2015-04-12 17:51:23 +09:00
Tatsuhiro Tsujikawa
7451a73def
nghttpx: Don't push resource if link header has non empty loadpolicy
2015-04-12 17:42:25 +09:00
Tatsuhiro Tsujikawa
889e705f35
nghttpx: Add logging for somewhat important events (logs, tickets, and ocsp)
2015-04-11 00:08:28 +09:00
Tatsuhiro Tsujikawa
14d4979c54
Don't install libnghttp2_asio headers if they are disabled
2015-04-10 23:11:40 +09:00
Tatsuhiro Tsujikawa
095bc178f3
nghttpx: Robust HTTP/1 backend CL and TE handling
...
We should ignore Content-Length and Transfer-Encoding for upgraded
response, and reset content-length if this is a non-final response.
2015-04-10 22:30:20 +09:00
Tatsuhiro Tsujikawa
308738025c
nghttpx: Don't set response content-length if HTTP/2 response upgraded
2015-04-10 22:24:17 +09:00
Tatsuhiro Tsujikawa
97366bf55c
nghttpx: Set content-length after complete request/response headers
2015-04-10 22:10:51 +09:00
Tatsuhiro Tsujikawa
9803f92e9c
nghttpx: Set Downstream to stream user data on HTTP Upgrade to h2
2015-04-10 02:40:09 +09:00
Tatsuhiro Tsujikawa
44b4cda200
src: Check return value from nghttp2_session_get_stream_user_data
2015-04-10 00:21:31 +09:00
Tatsuhiro Tsujikawa
69a4f3bf42
nghttp: Consider :authority custom header field for SNI
2015-04-10 00:15:01 +09:00
Tatsuhiro Tsujikawa
b873930802
nghttpx: Now ocsp works without threads
2015-04-09 01:03:28 +09:00
Tatsuhiro Tsujikawa
bc53c81616
nghttpx: Replace posix_spawn functions with fork + dup2 + execve
...
Although posx_spawn is very convenient and useful, we have platform
which don't have these functions (e.g., Android NDK r10d).
2015-04-09 01:03:28 +09:00
Tatsuhiro Tsujikawa
09c485e712
nghttpx: Eliminate 1 second refresh timer
2015-04-09 01:03:28 +09:00
Tatsuhiro Tsujikawa
d247470da2
nghttpx: Rewrite ocsp without thread
...
Since libev handles SIGCHLD, using waitpid in separate thread to wait
for the completion of fetch-ocsp-response script process is undefined.
This commit rewrite ocsp handling code so that it utilizes libev
ev_child watcher and perform ocsp update without thread.
2015-04-09 01:03:28 +09:00
Tatsuhiro Tsujikawa
cf0576253f
Merge branch 'master' into v1.0.0
2015-04-08 18:10:04 +09:00
Tatsuhiro Tsujikawa
1fcd881395
nghttpx: Document that stderr is redirected to error log file
2015-04-08 17:33:18 +09:00
Tatsuhiro Tsujikawa
dd435b51ab
nghttpx: Redirect stderr to errorlog file
2015-04-08 16:59:58 +09:00
Tatsuhiro Tsujikawa
80743ddc7b
nghttpx: Set promised Downstream as nghttp2 stream user data
2015-04-08 16:07:53 +09:00
Tatsuhiro Tsujikawa
36a8f24559
nghttpx: Finish incomplete incoming request with END_STREAM flag
...
Previously we send RST_STREAM when we send DATA with END_STREAM flag
set. With this commit, we also do this when we send HEADERS with
END_STREAM flag set.
2015-04-08 16:07:13 +09:00
Tatsuhiro Tsujikawa
b25e19e876
nghttpx: HTTP backend: Check parser error first so that we can get error msg
2015-04-08 14:39:27 +09:00
Tatsuhiro Tsujikawa
e9660c3558
nghttpx: Fix heap-use-after-free
...
The bug was introduced by 8c3b379b66
.
2015-04-08 13:43:57 +09:00
Tatsuhiro Tsujikawa
8c3b379b66
Pool Memchunk per worker
2015-04-08 00:10:48 +09:00
Tatsuhiro Tsujikawa
d42f31ca78
nghttpx: Fix bug that data buffered in SSL object are not read
...
This is same issue described in https://github.com/h2o/h2o/issues/268 .
That is if SSL object has decrypted data buffered inside it, and
application does not read it for some reason (e.g., rate limit), we
have to check the existence of data using SSL_pending. This is
because buffered data inside SSL is not notified by io watcher. It is
obvious, but we totally missed it.
nghttpx code normally reads everything until SSL_read returns error
(want-read). But if rate limit is involved, we stop reading early.
Also in HTTP/1 code, while processing one request, we just read until
buffer is filled up. In these cases, we may suffer from this problem.
This commit fixes this problem, by performing SSL_pending() and if it
has buffered data and read io watcher is enabled, we feed event using
ev_feed_event().
2015-04-06 22:31:36 +09:00
Tatsuhiro Tsujikawa
3e50ef439d
Announce h2, final HTTP/2 ALPN identifier
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
d0c27d5229
Send 24 bytes client magic byte string by library
...
Previously nghttp2_session_send() and nghttp2_session_mem_send() did
not send 24 bytes client magic byte string (MAGIC). We made
nghttp2_session_recv() and nghttp2_session_mem_recv() process MAGIC by
default, so it is natural to make library send MAGIC as well. This
commit makes nghttp2_session_send() and nghttp2_session_mem_send()
send MAGIC. This commit also replace "connection preface" with
"client magic", since we call MAGIC as "connection preface" but it is
just a part of connection preface. NGHTTP2_CLIENT_CONNECTION_PREFACE
macro was replaced with NGHTTP2_CLIENT_MAGIC. The already deprecated
NGHTTP2_CLIENT_CONNECTION_HEADER macro was removed permanently.
nghttp2_option_set_no_recv_client_preface() was renamed as
nghttp2_option_set_no_recv_client_magic(). NGHTTP2_ERR_BAD_PREFACE
was renamed as NGHTTP2_ERR_BAD_CLIENT_MAGIC.
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
ebf214c8fc
nghttp2_on_invalid_frame_recv_callback should have lib_error_code as param
...
nghttp2_error_code is HTTP/2 standard error code and is too coarse to
know what's going on.
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
250ea53e4b
Deal with 24 bytes client connection preface by default
...
Since HTTP/2 spec requires for client to send connection preface, it
is reasonable to make this option enabled by default. It is still a
use case to disable this, so replace this option with
nghttp2_option_set_no_recv_client_preface().
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
01af6ea70c
Remove ALTSVC related code
...
HTTP/2 and HPACK are going to be published as RFC, but ALTSVC is still
in draft state. To make our API stable, it would be better to remove
ALTSVC API for 1.0.0 release.
2015-04-05 23:15:20 +09:00
Tatsuhiro Tsujikawa
7522d50d1a
nghttpd, tiny-nghttpd: No need to check existence of stream
...
The stream existence is guaranteed by library as of
cc03a12b75
.
2015-04-05 23:13:29 +09:00
Tatsuhiro Tsujikawa
9eff511c5e
Add nghttp2_send_data_callback to send DATA payload without copying
...
To avoid buffer copy in nghttp2_data_source_read_callback, this commit
introduces NGHTTP2_DATA_FLAG_NO_COPY and nghttp2_send_data_callback.
By using NGHTTP2_DATA_FLAG_NO_COPY in
nghttp2_data_source_read_callback, application can avoid to copy
application data to given buffer. Instead, application has to
implement nghttp2_send_data_callback to send complete DATA frame by
itself. We see noticeable performance increase in nghttpd and
tiny-nghttpd using this new feature. On the other hand, nghttpx does
not show such difference, probably because buffer copy is not
bottleneck. Using nghttp2_send_data_callback adds complexity, so it
is recommended to measure the performance to see whether this extra
complexity worth it.
2015-04-04 21:23:50 +09:00
Tatsuhiro Tsujikawa
1442b1bd0a
nghttpx: Remove --tls-ctx-per-worker option
...
--tls-ctx-per-worker option does not work well of OCSP stapling. Also
it makes session ID useless.
2015-03-31 00:42:21 +09:00
Tatsuhiro Tsujikawa
cc94632b29
src: Use separator "--" to mark start of the footer without ambiguity
2015-03-31 00:21:52 +09:00
Tatsuhiro Tsujikawa
5df770b9c1
h2load: Fix compile error with Android NDK
2015-03-30 23:59:03 +09:00
Tatsuhiro Tsujikawa
4bc9afe20a
nghttpx: Add OCSP stapling feature
2015-03-30 23:58:28 +09:00
Tatsuhiro Tsujikawa
ccea4d42b5
Refactor .gitignore files
2015-03-29 18:40:37 +09:00
Tatsuhiro Tsujikawa
12ced1cddc
nghttpx: Add flag to track connection state in HTTP/1 backend
2015-03-29 01:47:22 +09:00
Tatsuhiro Tsujikawa
3576f20e5a
nghttpx: Revert part of 6f58434d89
...
The reverted part of the change may use not connected socket in HTTP/1
backend.
2015-03-29 01:32:27 +09:00
Tatsuhiro Tsujikawa
a2486daee1
nghttpd: Rename Http2Handler::on_connect as connection_made
2015-03-28 20:21:12 +09:00
Tatsuhiro Tsujikawa
8bf440b89c
nghttpx: Rename Http2Session::on_connect as connection_made
2015-03-28 20:19:17 +09:00
Tatsuhiro Tsujikawa
e9cdb9c896
h2load: Remove unused fields in Client class
2015-03-28 20:17:30 +09:00
Tatsuhiro Tsujikawa
c4804ee50b
h2load: Remove Client::noop
2015-03-28 20:14:12 +09:00
Tatsuhiro Tsujikawa
95cb284e27
h2load: Rename Client::on_connect as connection_made
2015-03-28 20:13:37 +09:00
Tatsuhiro Tsujikawa
c4ccc376df
nghttp: Refactor function names
...
on_SOMETHING should be used only for I/O callback functions
2015-03-28 20:07:12 +09:00
Tatsuhiro Tsujikawa
6f58434d89
nghttpx, h2load: Perform write whenever read succeeds
2015-03-28 19:13:14 +09:00
Tatsuhiro Tsujikawa
de2c2ad65c
src: Update hexdump usage output so that help2rst.py can produce good output
2015-03-27 00:36:19 +09:00
Tatsuhiro Tsujikawa
dc85623060
nghttpx: Fix PUSH_PROMISE header field corruption
...
Fixes GH-194
2015-03-26 22:52:51 +09:00
Tatsuhiro Tsujikawa
8afbb6ca26
h2load: Fix crash if -t > -c
2015-03-26 19:57:37 +09:00
Tatsuhiro Tsujikawa
ed79637737
h2load: Add -d option to upload data to server
2015-03-26 19:53:42 +09:00
Tatsuhiro Tsujikawa
3b24be3bcd
src: Fix compile error with clang-3.6
2015-03-25 01:27:18 +09:00
Tatsuhiro Tsujikawa
ece8289aaf
nghttpx: Forward only "trailers" keyword in te when forwarding HTTP/2 backend
2015-03-25 01:20:41 +09:00
Tatsuhiro Tsujikawa
4042ff0fc4
nghttpx: Fix te header field is duplicated when forwarding HTTP/2 backend
2015-03-25 01:17:06 +09:00
Tatsuhiro Tsujikawa
125e32eb56
src: Refactor a bit
2015-03-24 21:45:59 +09:00
Tatsuhiro Tsujikawa
94bf8dcd4e
src: Refactor util::hexdump
2015-03-24 21:43:28 +09:00
Tatsuhiro Tsujikawa
89b8039466
nghttp, nghttpd: Add --hexdump option to hexdump incoming traffic
...
The output format is similar to `hexdump -C`
2015-03-24 02:30:51 +09:00
Tatsuhiro Tsujikawa
661fb2eb0e
NULL-terminate name and value in nghttp2_nv
...
Guaranteeing NULL-termination is very useful when name or value are
used with C functions which requires NULL-terminated string.
2015-03-23 23:25:57 +09:00
Tatsuhiro Tsujikawa
6893608ae2
Use literal instead of computed value in token lookup
2015-03-21 23:03:37 +09:00
mod-h2-dev
076eefbed6
fix for segfault by reserving correct worker count
2015-03-16 17:42:22 +02:00
Tatsuhiro Tsujikawa
08ec5b3fc0
nghttp: Restore same message displayed when some requests failed
2015-03-14 18:32:53 +09:00
Tatsuhiro Tsujikawa
4219fe7822
Bump up libnghttp2_asio LT revision to 1:0:0
2015-03-14 18:20:00 +09:00
Tatsuhiro Tsujikawa
8ea26fddfd
Fix compile error "chosen constructor is explicit in copy-initialization"
2015-03-14 15:54:55 +09:00
Tatsuhiro Tsujikawa
98add63cdf
nghttp: Treat stream as success if we see END_STREAM from peer
2015-03-14 00:09:10 +09:00
Tatsuhiro Tsujikawa
7b90404072
nghttpx: Omit well-known port from hostport in downstream request
2015-03-14 00:09:10 +09:00
Tatsuhiro Tsujikawa
de0543f684
nghttpx: Refactor a bit
2015-03-14 00:09:10 +09:00
Tatsuhiro Tsujikawa
46e3be7b5b
nghttpx: Simplify backend request line construction
...
It turns out that the cause of complication in backend request line
construction is a absolute-form in HTTP/1 request. In HTTP/2, we have
separated pseudo-header fields and no problem at all. In this commit,
we parse request URI in HTTP/1 frontend and extract values from it to
make backend logic simpler. This patch removes host header field
emission in HTTP/2 backend if :authority is emitted. It also rewrites
host header field with authority part in absolute-form URI as per RFC
7230.
2015-03-14 00:09:10 +09:00
Tatsuhiro Tsujikawa
d46e50b112
nghttpx: Refactor DownstreamQueue to avoid expensive std::map
2015-03-12 01:13:55 +09:00
Tatsuhiro Tsujikawa
0f87cedc2d
nghttpx: Use doubly linked list for dconns_ and streams_
2015-03-11 21:35:47 +09:00
Tatsuhiro Tsujikawa
d34095cf49
nghttpx: Pin HTTP/2 upstream to one Http2Session to improve performance
2015-03-11 21:14:55 +09:00
Tatsuhiro Tsujikawa
4877f72a75
nghttpx: Optimize a bit
2015-03-11 00:42:18 +09:00
Tatsuhiro Tsujikawa
274b3a2296
nghttpx: Reset connection check timer on successful write while not checking
2015-03-11 00:27:51 +09:00
Tatsuhiro Tsujikawa
93013f4205
nghttpx: Remove --backend-http2-connection-check option, enable it by default
2015-03-11 00:22:05 +09:00
Tatsuhiro Tsujikawa
a0524ef05d
Fix busy loop
2015-03-11 00:11:51 +09:00
Tatsuhiro Tsujikawa
0e3ae63965
nghttpx: Add --backend-http2-connections-per-worker
2015-03-10 23:43:25 +09:00
Tatsuhiro Tsujikawa
3e14261ebf
nghttpx: Setting failure mode in on_connect() may affect other backends
2015-03-10 23:21:48 +09:00
Tatsuhiro Tsujikawa
446de923f3
nghttpx: Support multiple HTTP/2 session per worker
...
Currently, we use same number of HTTP/2 sessions per worker with given
backend addresses. New option to specify the number of HTTP/2 session
per worker will follow.
2015-03-10 23:20:21 +09:00
Tatsuhiro Tsujikawa
c5860fc6f4
nghttpx: Support multiple -b option for HTTP/2 backend
2015-03-10 21:54:29 +09:00
Tatsuhiro Tsujikawa
6b714030dd
nghttpx: Disable acceptor temporarily when process runs out of fd
2015-03-10 21:25:20 +09:00
Tatsuhiro Tsujikawa
8483225839
nghttpx: Don't rewrite host for CONNECT method
2015-03-10 00:44:35 +09:00
Tatsuhiro Tsujikawa
585af93828
nghttpx: Remove last write/read fields for TLS
...
It seems that we don't care about this since we don't change buffer
pointer between would-block write/read and next write/read. Somehow
we decided we need these fields. As a precaution, we set
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER in SSL_set_mode() for both server
and client contexts.
2015-03-10 00:11:11 +09:00
Tatsuhiro Tsujikawa
41e266181e
nghttpx: Attempt to improve HTTP/2 backend connection check
...
It turns out that writing successfully to network is not enough.
After apparently successful network write, read fails and then we
first know network has been lost (at least my android mobile network).
In this change, we say connection check is successful only when
successful read. We already send PING in this case, so we just wait
PING ACK with short timeout. If timeout has expired, drop connection.
Since waiting for PING ACK could degrade performance for fast reliably
connected network, we decided to disable connection check by default.
Use --backend-http2-connection-check to enable it.
2015-03-09 23:37:54 +09:00
Kazuho Oku
2a4f347dbc
do not send pseudo-headers when in HTTP/1
2015-03-09 11:40:13 +09:00
Tatsuhiro Tsujikawa
b9d6fff962
nghttpx: Allow accepting trailer part in h1 frontend
...
Downstream's headers mutation functions have been rewritten to share
code.
2015-03-08 18:39:45 +09:00
Tatsuhiro Tsujikawa
9ffbc45ba6
nghttpx: Allow sending trailer part in h1 backend link
2015-03-08 17:58:00 +09:00
Tatsuhiro Tsujikawa
961f41d7ce
nghttp, nghttpd: Add trailer header field when sending trailer part
2015-03-08 17:52:36 +09:00
Tatsuhiro Tsujikawa
928d3e5f3f
nghttpx: Allow sending trailer header field
2015-03-08 17:51:52 +09:00
Tatsuhiro Tsujikawa
42eeebc7f6
nghttpx: Add function to send trailer part in h1 frontend
2015-03-08 17:32:38 +09:00
Tatsuhiro Tsujikawa
991baf9e69
nghttpx: Use http2::copy_headers_to_nva in trailer part handling
2015-03-08 17:32:01 +09:00
Tatsuhiro Tsujikawa
6ad63a06b0
nghttpx: Support response trailer part handling in h1 backend
2015-03-08 17:20:38 +09:00
Tatsuhiro Tsujikawa
60c2fe5a2e
nghttpx: Support trailer-part in h2 <- h2 path
2015-03-08 16:48:45 +09:00
Tatsuhiro Tsujikawa
41b5077330
nghttpx: Support trailer part in h2 -> h2 path
2015-03-08 16:33:40 +09:00
Tatsuhiro Tsujikawa
d10dc4bb9b
nghttp, nghttpd: Clean up around NGHTTP2_DATA_FLAG_NO_END_STREAM
2015-03-08 16:28:23 +09:00
Tatsuhiro Tsujikawa
c4b487be05
asio: Add client::request::write_trailer()
2015-03-07 23:04:31 +09:00
Tatsuhiro Tsujikawa
c976a0fcd1
asio: Add server::response::write_trailer()
2015-03-07 19:26:42 +09:00
Tatsuhiro Tsujikawa
80a7523b49
nghttpd: Add --trailer to send trailer header fields
2015-03-07 17:50:03 +09:00
Tatsuhiro Tsujikawa
4c55a2340b
nghttp: Add --trailer optiont to send trailer header fields with -d option
2015-03-07 17:45:46 +09:00
Tatsuhiro Tsujikawa
196d7da53f
nghttpx: Use http2::expect_response_body()
2015-03-07 15:50:52 +09:00
Tatsuhiro Tsujikawa
6824319fe6
asio: Link with http-parser
2015-03-07 15:48:38 +09:00
Tatsuhiro Tsujikawa
66d00954a5
asio: Quote ServeMux documents in http2::handle()
2015-03-07 03:17:13 +09:00
Tatsuhiro Tsujikawa
a043230371
asio: Fix crach in client code
2015-03-07 01:38:59 +09:00
Tatsuhiro Tsujikawa
c2f49fa478
nghttpd: Fix bug that date header field value is not updated
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
773b108eeb
asio: Add noexcept for move constructor and move assignment operator
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
36a9cbf41f
asio: Use large window size for client
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
f8182333b4
asio: Improve date header field precision
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
c3265de625
asio: Remove signal handling from server
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
fa21b95274
asio: Provide move constructor and move assignment operator to server::http2
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
5dccc88a7c
asio: Add host_service_from_uri() to extract remote address from URI
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
2cadd38b6b
asio: Fix path matching in server
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
d7cfe464a2
asio: client::configure_tls_context takes error_code
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
018e9eaf6d
asio: Clean up server API to explicitly set error code
2015-03-07 01:10:49 +09:00
Tatsuhiro Tsujikawa
94ca9705ef
asio: Rewrite response body handling if response body is not expected
2015-03-06 21:36:40 +09:00
Tatsuhiro Tsujikawa
05a847b6b8
asio: Use passed URI for request
2015-03-06 02:35:44 +09:00
Tatsuhiro Tsujikawa
38788d707b
asio: Don't send response body if it is not expected by status code or method
2015-03-06 02:15:34 +09:00
Tatsuhiro Tsujikawa
44c0d32a1b
asio: Fix compile error with gcc
2015-03-06 02:05:01 +09:00
Tatsuhiro Tsujikawa
36aae8c310
asio: Move server::http2 to its own file
2015-03-06 01:58:56 +09:00
Tatsuhiro Tsujikawa
34ac90443f
asio: Rename http2::listen as http2::listen_and_serve
2015-03-06 01:54:28 +09:00
Tatsuhiro Tsujikawa
992c14e354
asio: Rename *_reader as *_generator and read_cb as generator_cb
2015-03-06 01:47:55 +09:00
Tatsuhiro Tsujikawa
529fc937dc
asio: Document public APIs
2015-03-06 01:41:06 +09:00
Tatsuhiro Tsujikawa
05b8d8c5b7
asio: Start sending response header when write_head is called
2015-03-06 00:06:53 +09:00
Tatsuhiro Tsujikawa
a1c937a007
src: Add missing dquote in HTML
2015-03-05 23:34:42 +09:00
Tatsuhiro Tsujikawa
8baec366f0
asio: Make redirect_handler and status_handler part of public API
2015-03-05 23:32:21 +09:00
Tatsuhiro Tsujikawa
c64bb62ffe
asio: Make redirect_handler use passed uri as is and percent-encode path part
2015-03-05 23:23:17 +09:00
Tatsuhiro Tsujikawa
6020b727d8
asio: Add signal_write() to server::http2_handler to avoid scattered ifs
2015-03-05 22:00:14 +09:00
Tatsuhiro Tsujikawa
7f04968950
asio: Add dtor to API classes
2015-03-05 21:51:44 +09:00
Tatsuhiro Tsujikawa
ca1f43dfca
asio: Export session_impl* from stream rather than delegating everything
2015-03-05 21:48:37 +09:00
Tatsuhiro Tsujikawa
9efb62f40b
asio: Move server classes to dedicated files
2015-03-05 21:42:48 +09:00
Tatsuhiro Tsujikawa
f1c7d3edfd
asio: Rename server::http2_stream as server::stream
2015-03-05 21:03:03 +09:00
Tatsuhiro Tsujikawa
7ff38eeb2e
asio: Start writing on cancel
2015-03-05 03:00:18 +09:00
Tatsuhiro Tsujikawa
e4ce595ebb
asio: Add serve_mux class to route incoming requet by path
...
serve_mux is direct port of ServeMux from go
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
8accf3898a
asio: Add client::request::resume() member function
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
690a1622aa
asio: Add const qualifier to client::session member functions
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
aaef798566
asio: Add server::response::io_service()
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
0753fcd6e5
asio: Add error_code parameter to cancel()
2015-03-05 02:12:32 +09:00
Tatsuhiro Tsujikawa
a14029744c
asio:: Add cancel() and on_close() to server::response
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
7e46d0b142
asio: Call signal_write() on session_impl::cancel()
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
726e6c087d
asio: server: Move push member function to response object
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
ff0eaf8399
asio: Indicate EOF by passing 0 to the second parameter to data_cb
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
7fb7575f78
asio: read_cb: Use similar semantics with nghttp2_data_source_read_callback
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
44642af227
asio: Remove unused struct header
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
e7d052100c
asio: Utilize aggregate or value-initialization for header_value
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
fc2170e488
asio: Use uri_ref in server code
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
0cda2282dd
asio: Assign values to uri_ref directly
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
6753b6d61e
asio: Use header_map in server code
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
35817876fe
asio: Move server API to asio_http2_server.h
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
7d753d779e
asio: Fix resource leak (socket not closed) in server code
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
f6f908a541
asio: Make impl() const
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
b0c1986a46
asio: Avoid shared_ptr for request and response
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
9671eaa850
asio: Set stream pointer to request and response in stream ctor
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
062b42918c
asio: Remove threaded task runner
...
This is too complicated and not suitable for event driven server. We
plan to expose io_service instead.
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
2fa28e790d
asio: Separate client API to asio_http2_client.h
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
76eab3faa0
asio: Pass connected address to connect_cb
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
70ea774f23
asio: Clear up TLS peer verification
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
e15d302985
asio: Introduce uri_ref
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
b2196f215a
asio: Use boost::system::error_code for on_error callback
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
8afd75ca47
Make request, response const
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
0676535caf
Do async-resove in ctor
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
dd741a58ae
Use header_map instead of wrapping it
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
26304546c4
[WIP] Add asio client interface
2015-03-05 02:12:31 +09:00
Tatsuhiro Tsujikawa
c2426bc732
Merge branch 'pthread-getspecific' of https://github.com/icing/nghttp2 into icing-pthread-getspecific
2015-03-05 02:04:56 +09:00
Tatsuhiro Tsujikawa
08d0cdfd31
Fix typo
2015-03-04 02:48:20 +09:00
Stefan Eissing
1fd44b1567
replacing thread_local, which does not exist on OS X, with pthread_getspecific call
2015-03-03 17:09:15 +01:00
acesso
6a2e6b744f
Update shrpx_config.cc
...
declaration of make_socket_closeonexec need the proper scope here, it was there per request at https://github.com/tatsuhiro-t/nghttp2/pull/142 , not sure why is was removed.
2015-03-02 17:14:09 -03:00
Tatsuhiro Tsujikawa
4de8db523f
nghttpx: Check frame type in HTTP/2 backend on_begin_headers_callback
2015-03-02 00:53:48 +09:00
Tatsuhiro Tsujikawa
cf5ac0f363
nghttpx: Fix broken server push after HTTP upgrade
2015-03-01 11:03:48 +09:00
Tatsuhiro Tsujikawa
185ebd7b79
nghttpx: Fix crash when upgrading HTTP/2 failed
2015-03-01 10:11:45 +09:00
Tatsuhiro Tsujikawa
f3a0ab6552
nghttpd: Fix help output so that it can be generated in man/html nicely
2015-02-27 00:56:26 +09:00
Tatsuhiro Tsujikawa
1c2c5bdd05
Revert "nghttpx: Add missing Downstream::end_upload_data() call in HTTP/2 and SPDY"
...
This reverts commit ef090d425e
.
2015-02-27 00:32:48 +09:00
Tatsuhiro Tsujikawa
3715a89655
Merge branch 'bcard/address-nghttp2-server' of https://github.com/bcard/nghttp2 into bcard-bcard/address-nghttp2-server
...
Conflicts:
src/nghttp.cc
2015-02-27 00:02:45 +09:00
Tatsuhiro Tsujikawa
ef090d425e
nghttpx: Add missing Downstream::end_upload_data() call in HTTP/2 and SPDY
...
This ensures that all frontend code calls
Downstream::end_upload_data() when request was all received.
2015-02-26 23:50:21 +09:00
Tatsuhiro Tsujikawa
e1bb06d8ab
nghttpx: Remove unused error check
2015-02-26 23:46:42 +09:00
Brian Card
1bdf664f4d
Changing signature of numeric_name from numeric_name(addrinfo *addr)
...
to numeric_name(const struct sockaddr *sa, socklen_t salen) to remove
dependency on addrinfo struct.
2015-02-26 08:59:25 -05:00
Tatsuhiro Tsujikawa
1c0d617742
nghttpx: Rename WorkerConfig as LogConfig
...
This is a sign that we only use thread-local storage for logging only.
2015-02-26 00:02:29 +09:00
Tatsuhiro Tsujikawa
b161dfe573
nghttpx: Move graceful_shutdown flag from WorkerConfig to Worker
...
A part of an effort to eliminate thread_local WorkerConfig
2015-02-25 22:53:53 +09:00
Brian Card
b773d63b92
Moving nghttp's numeric_name function to util.cc and using this to generate the address name in HttpServer.cc
2015-02-24 09:50:18 -05:00
Tatsuhiro Tsujikawa
66b6787fbe
src: Use "sensitive" to indicate "never indexed" header field
2015-02-24 23:12:12 +09:00
Tatsuhiro Tsujikawa
1a2bccd71c
nghttpx: Share nghttp2_session_callbacks between objects
2015-02-24 15:21:10 +09:00
Tatsuhiro Tsujikawa
8417275368
nghttpx: Code cleanup
2015-02-24 15:11:09 +09:00
Tatsuhiro Tsujikawa
c98cf045d6
nghttpx: Use omit minor version in case of HTTP/2 in via header and accesslog
2015-02-24 14:43:01 +09:00
Brian Card
933b9636e5
removing additional space after option variable
2015-02-23 07:15:54 -05:00
Brian Card
d10bce3dc8
fixing formatiing
2015-02-23 07:13:03 -05:00
Tatsuhiro Tsujikawa
8b533e19bb
nghttpx: Remove option name from unix path sample since it is a bit strange
2015-02-22 18:09:37 +09:00
Tatsuhiro Tsujikawa
df32a534fc
nghttpx: Rename ConnectionHandler::acceptor4_ as acceptor_
...
This change is motivated by that fact that we use it for UNIX domain
socket as well as IPv4.
2015-02-22 17:59:50 +09:00
Tatsuhiro Tsujikawa
e583a25a8b
nghttpx: Fix error found by coverity scan
2015-02-22 17:53:12 +09:00
Tatsuhiro Tsujikawa
da2376effd
nghttpx: Add host_unix field to DownstreamAddr to tell it is UNIX domain sock
2015-02-22 17:25:23 +09:00
Tatsuhiro Tsujikawa
0c4ae3dea5
nghttpx: Support UNIX domain socket on frontend
...
This commit also fixes environment variables used to tell inherited
file descriptors to new binary are stacked up each time new binary is
executed.
2015-02-22 17:25:23 +09:00
Tatsuhiro Tsujikawa
e457c9a414
src: Add util::strieq_l
2015-02-22 15:32:48 +09:00
Tatsuhiro Tsujikawa
997f9233bc
nghttpx: Support UNIX domain socket in backend connections
2015-02-22 12:27:51 +09:00
Tatsuhiro Tsujikawa
49781da8f0
nghttpx: Don't need to const_cast to sockaddr*
2015-02-22 12:06:31 +09:00
Tatsuhiro Tsujikawa
7f9de007d0
nghttpx: Fix crash in http/1 backend when backend returns more bytes than CL
...
This is typically programming mistake that we did not check return
value before doing another.
2015-02-21 21:17:52 +09:00
Tatsuhiro Tsujikawa
c84a190ac7
nghttpx: Use return 0 instead of break for readability
2015-02-21 17:08:03 +09:00
Tatsuhiro Tsujikawa
a26a597453
nghttpx: Cast configuration value to rlim_t to avoid compile error on 32bit
2015-02-21 16:57:02 +09:00
Tatsuhiro Tsujikawa
04ef26473a
asio-lib: Increase output buffer size
2015-02-21 00:08:10 +09:00
Tatsuhiro Tsujikawa
7897f5b94b
asio-lib: Remove validation offered by nghttp2 lib
2015-02-21 00:06:05 +09:00
Tatsuhiro Tsujikawa
9302e3edf4
src: Use util::streq_l to compare against string literal
2015-02-20 23:57:40 +09:00
Tatsuhiro Tsujikawa
ab93a700ce
src: Announce h2 ALPN
2015-02-20 23:50:17 +09:00
Tatsuhiro Tsujikawa
4424cf5b65
nghttpx: Fix 1 second delay in HTTP/2 backend connection
2015-02-20 19:48:35 +09:00
Tatsuhiro Tsujikawa
00a83a44b4
nghttp: Simplify checking
2015-02-20 19:35:54 +09:00
Tatsuhiro Tsujikawa
f755ea3894
nghttpx: Simplify HttpsUpstream::on_read
2015-02-20 19:24:48 +09:00
Tatsuhiro Tsujikawa
50c4aa061f
nghttpx: Response with 503 when re-submission to backend failed
2015-02-20 19:23:52 +09:00
Tatsuhiro Tsujikawa
6657966334
nghttpx: HttpsUpdatem: Don't send error_page if response state is MSG_COMPLETE
2015-02-20 01:25:18 +09:00
Tatsuhiro Tsujikawa
512aa8942a
nghttp: Fix -H does not work with -u upgrade request
2015-02-20 01:16:49 +09:00
Tatsuhiro Tsujikawa
489b4f307c
nghttp, nghttpd, nghttpx: Remove validations libnghttp2 offers
2015-02-20 01:01:10 +09:00
Tatsuhiro Tsujikawa
b157d4ebb2
Validate HTTP semantics by default
...
Previously we did not check HTTP semantics and it is left out for
application. Although checking is relatively easy, but they are
scattered and error prone. We have implemented these checks in our
applications and also feel they are tedious. To make application
development a bit easier, this commit adds basic HTTP semantics
validation to library code. We do following checks:
server:
* HEADERS is either request header or trailer header. Other type of
header is disallowed.
client:
* HEADERS is either zero or more non-final response header or final
response header or trailer header. Other type of header is
disallowed.
For both:
* Check mandatory pseudo header fields.
* Make sure that content-length matches the amount of DATA we
received.
If validation fails, RST_STREAM of type PROTOCOL_ERROR is issued.
2015-02-20 01:01:10 +09:00
Tatsuhiro Tsujikawa
9845729709
nghttp: Update resource timing terminology according to Resource Timing TR
2015-02-18 00:45:52 +09:00
Tatsuhiro Tsujikawa
dbfc02cba0
nghttpx: Issue RST_STREAM if END_STREAM seen without final response
2015-02-18 00:36:49 +09:00
Tatsuhiro Tsujikawa
d1a1e882bf
nghttpx: Fix request re-submission bug in HTTP/2 backend
2015-02-17 23:15:53 +09:00
Tatsuhiro Tsujikawa
799778af69
Revert "nghttpx: Fix request resubmit bug on HTTP/2 backend connection check"
...
This reverts commit d45f5a51e4
.
2015-02-17 22:28:03 +09:00
Tatsuhiro Tsujikawa
d45f5a51e4
nghttpx: Fix request resubmit bug on HTTP/2 backend connection check
2015-02-17 21:50:32 +09:00
Tatsuhiro Tsujikawa
bb856fe4c5
nghttp: Fix unaligned field output in --stat
2015-02-15 16:24:04 +09:00
Tatsuhiro Tsujikawa
f87aaf1fbf
nghttp: Show '*' to mark pushed resources in --stat output
2015-02-15 12:46:00 +09:00
Tatsuhiro Tsujikawa
685dabc2d6
nghttp: Don't request already pushed resources
2015-02-15 12:36:18 +09:00
Tatsuhiro Tsujikawa
4cafdb7670
nghttp: Show received size in --stat
2015-02-15 12:36:13 +09:00
Tatsuhiro Tsujikawa
58d3b5b4a0
nghttpx: Fix occasional HTTP/2 backend connection failure with proxy
...
Previously if HTTP/1 proxy is used for backend connection, we read all
incoming bytes from proxy including response body, which may be part
of HTTP/2 protocol. While investigating this issue, we found that
http_parser_execute() returns 1-less length when we call
http_parser_pause() inside on_headers_complete callback. To
workaround this, we increment the return value by 1. This commit also
fixes possible segmentation fault error, which could be caused by the
lack of stopping libev watcher in disconnect().
2015-02-15 01:09:10 +09:00
Tatsuhiro Tsujikawa
011e3b325d
nghttpx: Cancel backend request when frontend HTTP/1 connection is lost
2015-02-13 22:41:50 +09:00
Tatsuhiro Tsujikawa
6f4f252907
nghttpd: Handle return value from server.run()
2015-02-12 23:18:25 +09:00
Tatsuhiro Tsujikawa
115d7133a0
nghttpx: Don't check HEADERS category in on_frame_not_send_callback
2015-02-12 22:44:29 +09:00
Tatsuhiro Tsujikawa
c462093555
src: Use same convention for len parameter in TLS I/O with cleartext I/O
2015-02-11 23:22:53 +09:00
Tatsuhiro Tsujikawa
364772f508
src: Fix error reported by coverity scan
2015-02-11 23:20:13 +09:00
Tatsuhiro Tsujikawa
ae0100a9ab
nghttpx: Refactor worker interface
2015-02-11 22:49:03 +09:00
Tatsuhiro Tsujikawa
756e2b3e9b
nghttp, h2load: Fix regression introduced in 795a22a
...
We missed wb.reset(), which makes write buffer's capacity becomes 0
and communication stalls eventually.
2015-02-11 21:42:11 +09:00
Tatsuhiro Tsujikawa
73b999a662
src: Fix crash
2015-02-11 01:05:22 +09:00
Tatsuhiro Tsujikawa
4401f697e5
src: Try to write immediately after read
2015-02-11 00:44:30 +09:00
Tatsuhiro Tsujikawa
f360b5c1e3
src: Prefer std::equal
2015-02-11 00:20:33 +09:00
Tatsuhiro Tsujikawa
07fdaaba45
src: Use case-insensitive match when parsing Link header field
2015-02-10 23:29:45 +09:00
Tatsuhiro Tsujikawa
7fa62c9904
src: Clean up string utlity functions
2015-02-10 23:16:34 +09:00
Tatsuhiro Tsujikawa
3e2714810a
src: Fix invalid memory access
2015-02-10 21:28:17 +09:00
Tatsuhiro Tsujikawa
68866f53b0
src: Use nullptr instead of 0, since they are char*
2015-02-09 23:45:20 +09:00
Tatsuhiro Tsujikawa
ad8e9a4741
src: Ignore URI with non-empty anchor parameter
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
3c5d8f446b
src: Fix typo
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
2e425e3cb6
src: Support backslash escapes in quoted-string when parsing Link header
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
1b00bc1929
src: Support rel with quoted value in Link header parser
2015-02-09 23:25:10 +09:00
Tatsuhiro Tsujikawa
d151759f8a
nghttpx: Fix location rewrite, take 2
2015-02-08 21:26:47 +09:00
Tatsuhiro Tsujikawa
807d39abe3
nghttpx: Fix location rewrite does not work
2015-02-08 18:54:24 +09:00
Tatsuhiro Tsujikawa
4d47c31ebe
src: Refactor parse_next_link_header_once
2015-02-08 17:47:21 +09:00
Tatsuhiro Tsujikawa
9e723b6b1d
src: Rename LinkHeader.url as LinkHeader.uri
2015-02-08 17:29:38 +09:00
Tatsuhiro Tsujikawa
7aff00496a
nghttpx: Log push request headers
2015-02-08 17:25:21 +09:00
Tatsuhiro Tsujikawa
0efdeab1db
nghttpx: Fix handling of return value from nghttp2_submit_push_promise
2015-02-08 17:21:27 +09:00
Tatsuhiro Tsujikawa
502b552b68
nghttpx: Add --no-server-push option
2015-02-08 16:19:12 +09:00
Tatsuhiro Tsujikawa
8c90e5314d
src: Update doc
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
af960f1982
nghttpx: Don't push if http2 proxy is used
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
7c09d5eb8d
nghttpx: PUSH_PROMISE from client is handled by library
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
88f0bc70c4
nghttpx: Reworkd inherited request headers in PUSH_PROMISE
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
b14cfaf308
src: Store token in Header object to avoid additional lookups
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
8dd8d68b83
src: Make index of header int16_t
2015-02-08 16:10:01 +09:00
Tatsuhiro Tsujikawa
c55d7343ca
nghttpx: Support server push using Link header field
...
nghttpx server push is initiated by looking for Link header field from
backend server response. Currently we only enable server push for
HTTP/1 backend and without HTTP/2 proxy mode. The URIs which have
rel=preload are eligible to resource to be pushed.
2015-02-08 16:10:00 +09:00
Tatsuhiro Tsujikawa
4dea318b5b
nghttpx: Fix compile error if SOCK_NONBLOCK is undefined
2015-02-08 00:49:56 +09:00
Tatsuhiro Tsujikawa
795a22a320
src: Remove ringbuf.h, use buffer.h instead
2015-02-06 23:40:34 +09:00
Tatsuhiro Tsujikawa
b4b2ddad3b
src: Rewrite defer function template
2015-02-06 23:27:15 +09:00
Tatsuhiro Tsujikawa
6ff67ae869
src: Move array_size to nghttp2 namespace
2015-02-06 22:44:09 +09:00
Tatsuhiro Tsujikawa
33879219ff
Refactor ALPN/NPN protocol selection and introduce NGHTTP2_PROTO_ALPN macro
2015-02-06 22:35:30 +09:00
Tatsuhiro Tsujikawa
4956bdc4da
src: Use std::copy_n
2015-02-06 21:35:03 +09:00
Tatsuhiro Tsujikawa
b165775811
nghttpx: Refactor CertLookupTree
2015-02-06 21:25:43 +09:00
Tatsuhiro Tsujikawa
90746cdd0e
nghttpx: Fix compile error with OpenSSL 1.0.2
2015-02-06 21:14:04 +09:00
Tatsuhiro Tsujikawa
4cda09beff
src: Prefer std::array
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
9a2d36fc6c
src: Use std::copy instead of std::copy_n since gcc-4.7 does not have it
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
ab6663c785
src: Use std::array instead of std::vector if size is compile time constant
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
54851ef7a6
src: Move make_unique to nghttp2 namespace
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
f8f9b36acd
http2: Use std::array for indexing headers
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
6774fa6e07
buffer: Refactor
2015-02-06 00:15:43 +09:00
Tatsuhiro Tsujikawa
7baf6f781e
memchunk: Refactor
2015-02-06 00:15:42 +09:00
Tatsuhiro Tsujikawa
2349a03882
nghttpx: Fix regression HTTP/2 upgrade does not work
2015-02-06 00:15:13 +09:00
Tatsuhiro Tsujikawa
3904550d5d
nghttpd: Shut up travis
2015-02-05 22:49:19 +09:00
Tatsuhiro Tsujikawa
be3ee91e90
nghttpd: Fix compile error on travis
2015-02-05 21:50:20 +09:00
Tatsuhiro Tsujikawa
d4f87ce29f
nghttpd: Fix multiple push configuration does not work
2015-02-05 21:31:16 +09:00
Tatsuhiro Tsujikawa
1216d7d912
nghttpx: Connection: Explicit assignment to double field
2015-02-05 21:26:55 +09:00
Tatsuhiro Tsujikawa
f3b247e4c8
nghttpx: Add missing rev start in HTTP/2 backend
2015-02-05 03:05:34 +09:00
Tatsuhiro Tsujikawa
7c75d9db98
nghttpx: Set nghttp2_option_set_peer_max_concurrent_streams for HTTP/2 backend
2015-02-05 03:05:34 +09:00
Tatsuhiro Tsujikawa
b2fb888363
Share I/O code with all upstreams/downstream objects
2015-02-05 03:05:34 +09:00
Tatsuhiro Tsujikawa
a4d729d36b
nghttpx: Return HTTP error on downstream parser failure on HTTPS upstream
2015-02-04 21:30:05 +09:00
Tatsuhiro Tsujikawa
a68c4c1e3c
nghttpx: Add --no-host-rewrite option
2015-02-04 01:42:26 +09:00
Tatsuhiro Tsujikawa
82f90f9030
nghttpx: Rewrite :authority and host header field
...
We don't rewrite them if -s or -p is used
2015-02-04 01:42:19 +09:00
Tatsuhiro Tsujikawa
b707cfe986
nghttpx: Fix busy loop when HTTP/2 backend reset after connection established
...
We have now Downstream retry count to be limited to 5 times. At 6th
failure, we send 503 message to client.
2015-02-03 01:47:04 +09:00
Tatsuhiro Tsujikawa
d37fc8f3a6
src: Fix compiler warning
2015-02-02 22:40:41 +09:00
Tatsuhiro Tsujikawa
9f5f724147
nghttpd, nghttpx: Don't log error NGHTTP2_ERR_BAD_PREFACE
2015-02-02 00:20:44 +09:00
Tatsuhiro Tsujikawa
36e216d24a
src: Delete unused source files
2015-02-01 18:12:57 +09:00
Tatsuhiro Tsujikawa
cabb7c73cd
nghttp: Widen column for complete and request to account for +
2015-02-01 18:07:53 +09:00
Tatsuhiro Tsujikawa
3a37ed97f4
nghttp: Rewrite statistics output with -s option
...
Now timing information (completion, request, processing), status code
and request path are listed in the order by completion time. This
ordering is very convenient to check resource prioritization
validation.
2015-02-01 17:59:49 +09:00
Tatsuhiro Tsujikawa
0f14c93fa4
nghttp: Refactor
2015-02-01 17:21:13 +09:00
Tatsuhiro Tsujikawa
f321ee5a61
nghttp: Record request time just before transmission of request
2015-02-01 16:58:58 +09:00
Tatsuhiro Tsujikawa
17de036d85
h2load: Code cleanup
2015-01-31 23:54:03 +09:00
Tatsuhiro Tsujikawa
a91e0de06c
h2load: Add request stats (time for request min, max, mean and sd)
2015-01-31 23:49:30 +09:00
Tatsuhiro Tsujikawa
f1049a66e2
nghttpx: Detach DownstreamConnection early
2015-01-31 01:11:55 +09:00
Tatsuhiro Tsujikawa
5a497b9f30
nghttpx: Update doc
2015-01-30 21:33:18 +09:00
Tatsuhiro Tsujikawa
b4ad0a30af
Fix typo
2015-01-30 21:32:41 +09:00
Tatsuhiro Tsujikawa
1816738b3c
nghttpx: Change frontend write buffer size to 32768
2015-01-30 21:32:21 +09:00
Tatsuhiro Tsujikawa
0a0618baac
nghttpx: Add test for util::duration_str, rename util::parse_duration_with_unit
2015-01-29 23:28:47 +09:00
Tatsuhiro Tsujikawa
e03f36eeeb
nghttpx: Use <DURATION> instead of <T>
2015-01-29 23:23:30 +09:00
Tatsuhiro Tsujikawa
6b1ef95d3f
nghttpx: Replace RingBuf with sequential Buffer
...
It turns out that we don't need circular buffer functionality. We
replaced RingBuf with simple sequential Buffer.
2015-01-29 22:57:56 +09:00
Tatsuhiro Tsujikawa
147bc45658
nghttpx: Refactor memchunk a bit
2015-01-29 21:18:30 +09:00
Tatsuhiro Tsujikawa
00555dc7bb
nghttpx: Use TCP_DEFER_ACCEPT if available
2015-01-29 21:14:44 +09:00
Tatsuhiro Tsujikawa
d1a4002b22
nghttpx: Remove --accept-delay and --num-accept options
2015-01-29 20:58:47 +09:00
Tatsuhiro Tsujikawa
8ddad1a53d
nghttpx: Remove shrinking memchunks for now
...
It requires more careful optimization. Remove it for now.
2015-01-28 21:25:22 +09:00
Tatsuhiro Tsujikawa
96e66b1a81
nghttpx: Make num_accept 0 on graceful shutdown
...
Make num_accept unlimited so that we can accept all pending
connections waiting in listen queue.
2015-01-28 21:02:31 +09:00
Tatsuhiro Tsujikawa
19429abd07
nghttpx: Make --accept-delay default to 10ms
2015-01-28 21:00:47 +09:00
Fabian Möller
3167aa4081
nghttpx: set the supplementary group access list
2015-01-28 20:56:05 +09:00
Tatsuhiro Tsujikawa
93daa98608
src: Make option suggestion work with unknown option followed by '='
2015-01-28 00:58:42 +09:00
Tatsuhiro Tsujikawa
f8765be817
nghttpx: Make --backend-keep-alive-timeout default to 2s
2015-01-28 00:47:09 +09:00
Tatsuhiro Tsujikawa
f0c7839f25
nghttpx: Clarify --num-accept=0 case
2015-01-28 00:39:56 +09:00
Tatsuhiro Tsujikawa
6a39de0ae5
nghttpx: Accept s or ms as unit for <T> argument
2015-01-28 00:36:44 +09:00
Tatsuhiro Tsujikawa
402ebb277f
nghttpx: Add --num-accept and --accept-delay options
2015-01-27 23:47:56 +09:00
Tatsuhiro Tsujikawa
4e68ca8233
integration: Add tests about via header field manipulation
...
This test reveals bug in SPDY upstream code, and contains its fix.
2015-01-27 00:19:57 +09:00
Tatsuhiro Tsujikawa
b99b83812b
nghttpd: RST_STREAM if te header field contains value other than trailers
2015-01-25 22:58:43 +09:00
Tatsuhiro Tsujikawa
0b48448270
nghttpx: RST_STREAM for invalid request header values
2015-01-25 22:58:43 +09:00
Tatsuhiro Tsujikawa
2a56a3d9ea
nghttpx: Fix te request header handling
...
Checking against "trailers" is enough for now.
2015-01-25 22:58:43 +09:00
Tatsuhiro Tsujikawa
b9c6162cd5
nghttp: Use compatible cipher list
2015-01-25 17:53:17 +09:00
Tatsuhiro Tsujikawa
68510f1282
nghttpx: SpdyUpstream: Handle error from error_reply
2015-01-25 15:37:09 +09:00
Tatsuhiro Tsujikawa
4b58b25c19
nghttpx: Refactor code to build cert_tree, add SNI test
2015-01-25 15:36:14 +09:00
Brian Card
516a2f0efc
Adding an address parameter that allows nghttpd to bind to a non-default address. Both IPv4 and IPv6 addresses are supported. In addition with verbose mode enable the address that the webserver binds to is now printed in addition to the port.
2015-01-24 15:26:49 -05:00
Tatsuhiro Tsujikawa
fbd9bcb00e
Use _LDADD to specify libraries instead of _LDFLAGS
...
This is because _LDFLAGS comes before _LDADD. If we specify a library
and another library in _LDADD depends on it, we get undefined
reference error.
2015-01-25 00:58:30 +09:00
Tatsuhiro Tsujikawa
434e80dc7b
nghttpx: Reset stream if TE header field contains other than trailer
2015-01-24 15:31:59 +09:00
Tatsuhiro Tsujikawa
6b4b7bef23
nghttpx: Reset stream if request header field name is malformed
2015-01-24 00:37:26 +09:00
Tatsuhiro Tsujikawa
9a89db575a
nghttpx: Reject multiple Content-Length even if their values are identical
2015-01-24 00:07:28 +09:00
Tatsuhiro Tsujikawa
0f4b0966ef
nghttpx: Merge all options settings in one SSL_CTX_set_options
2015-01-23 23:32:01 +09:00
Tatsuhiro Tsujikawa
ecfd593076
nghttpx: Call ConnectBlocker::on_success when connection is established
2015-01-23 23:00:18 +09:00
acesso
7ea8037ee1
Use fcntl and FD_CLOEXEC if O_CLOEXEC is undefined
...
Same reported at #87 but at src/shrpx_config.cc src/instead of util.cc
2015-01-23 21:17:06 +09:00
Tatsuhiro Tsujikawa
a0028ea8ef
nghttpx: Add logging when downstream connect is blocked by connect_blocker
2015-01-23 00:15:38 +09:00
Tatsuhiro Tsujikawa
d174ffeb00
memchunk: Rename append_cstr as append
...
We may later add append(const T &), where we require T for .size() and
.data(). We can coexist former append_cstr and new one. If we pass
string literal, append(const (&)[N]) is selected.
2015-01-22 23:54:30 +09:00
Tatsuhiro Tsujikawa
5a93bedf72
nghttpx: Make error page modern
2015-01-22 23:51:22 +09:00
Tatsuhiro Tsujikawa
4a0dba08b9
nghttpx: Set Connection: close after graceful shutdown in HTTP/1 upstream
2015-01-22 23:46:35 +09:00
Tatsuhiro Tsujikawa
b685747643
Add nghttp2_submit_shutdown_notice() to start graceful shutdown
...
nghttp2_submit_shutdown_notice() is used to notify the client that
graceful shutdown is started. We expect that after this call, the
server application should send another GOAWAY using
nghttp2_submit_goaway() with appropriate last_stream_id. In this
commit, we also added nghttp2_session_get_last_proc_stream_id(), which
can be used as last_stream_id parameter.
This commit implements graceful shutdown in nghttpx. The integration
test for graceful shutdown is also added.
2015-01-22 23:21:58 +09:00
Tatsuhiro Tsujikawa
76a97b9718
nghttpx: Update last_write_time_ after SSL_write
...
SSL_write may return error indicating blocking until all given data
are written. Because of this, it is preferable to update
last_write_time_ after SSL_write regardless of its return value.
2015-01-22 21:14:16 +09:00
Tatsuhiro Tsujikawa
ac1cc56fbb
nghttpx: Stop wev_ on h1 backend connect failure
2015-01-22 21:13:34 +09:00
Tatsuhiro Tsujikawa
f604cbae70
nghttpx: Fix shutdown too early with QUIT signal if num_worker == 1
2015-01-22 01:46:25 +09:00
Tatsuhiro Tsujikawa
91ae5291cc
nghttpx: Cache string representation of time for logging
2015-01-21 23:52:30 +09:00
Tatsuhiro Tsujikawa
5770c6bd04
nghttpx: Return 503 on hard disconnect in HTTP/2 backend
2015-01-21 23:30:48 +09:00
Tatsuhiro Tsujikawa
7492f628aa
nghttpx: Use ConnectBlocker on h1 backend connect attempt failure
2015-01-21 23:11:47 +09:00
Tatsuhiro Tsujikawa
2f788aa214
nghttpx: Return 503 when h1 backend connect attempt failed
2015-01-21 23:08:13 +09:00
Tatsuhiro Tsujikawa
cee22df073
nghttpx: Always close connection in HttpsUpstream::error_reply
2015-01-21 23:03:39 +09:00
Tatsuhiro Tsujikawa
e219d6a94f
nghttpx: Clarify error_reply upstream method
...
There is no application level failure in h1 upstream. For h2, SPDY
upstreams, don't call DIE(), instead return -1 to delete handler.
2015-01-21 22:55:00 +09:00
Tatsuhiro Tsujikawa
41e72064e0
nghttpx: Log error in INFO level when frame cannot be sent
2015-01-21 22:49:00 +09:00
Tatsuhiro Tsujikawa
c0fc726955
nghttpx: Call signal_write in HttpsUpstream::on_downstream_abort_request
2015-01-21 22:45:52 +09:00
Tatsuhiro Tsujikawa
041d9863c2
nghttpx: Set request_start_time_ at Downstream ctor
...
.. so that we can avoid the problem that request_start_time_ is 0
2015-01-21 22:28:15 +09:00
Tatsuhiro Tsujikawa
3c5ca63b6f
nghttpx: Fix TLS write limit does not work
2015-01-21 21:47:25 +09:00
Tatsuhiro Tsujikawa
53a41c953d
nghttpx: Don't call ev_TYPE_set macro while watcher is active
2015-01-21 21:43:49 +09:00
Tatsuhiro Tsujikawa
9938a4e952
Remove AM_EXTRA_RECURSIVE_TARGETS since travis automake is too old
2015-01-21 02:07:16 +09:00
Tatsuhiro Tsujikawa
8997e4369d
nghttpx: Adjust backend buffers
2015-01-21 01:47:43 +09:00
Tatsuhiro Tsujikawa
5a6d6ccbd4
nghttpx: Read from backend eagerly in all upstreams
2015-01-21 01:41:17 +09:00
Tatsuhiro Tsujikawa
16e91746d9
nghttpx: Return 400 error if multiple CLs are received in SPDY upstream
...
This change adds SPDY upstream tests.
2015-01-21 01:03:56 +09:00
Tatsuhiro Tsujikawa
b9a9a23b1e
nghttpx: Close connection when error_reply is used for HTTP/1 upstream
2015-01-20 23:37:00 +09:00
Tatsuhiro Tsujikawa
8059380fb0
nghttpx: Don't need to set response state to MSG_COMPLETE after error_reply
2015-01-20 23:33:45 +09:00
Tatsuhiro Tsujikawa
b9f41e34ef
nghttpx: Return error when downstream HTTP/1 connection attempt failed
2015-01-20 23:27:30 +09:00
Tatsuhiro Tsujikawa
ca7288ae38
nghttpx: Return 502 if HTTP/1 downstream receives multiple CLs
2015-01-20 23:11:54 +09:00
Tatsuhiro Tsujikawa
f1bec6f05c
nghttpx: Return 400 for multiple CLs for HTTP/1 upstream
2015-01-20 22:55:01 +09:00
Tatsuhiro Tsujikawa
daec7c16d3
nghttpx: Don't discard data on HTTP/1 backend EOF
...
Also HTTP/1 frontend testing method was added.
2015-01-20 22:19:28 +09:00
Tatsuhiro Tsujikawa
6e446934d4
integration: Add recursive it target
2015-01-20 21:19:52 +09:00
Tatsuhiro Tsujikawa
a440bdf15e
nghttpx: Response 502 if HTTP/2 backend receives invalid Content-Length
2015-01-19 23:44:23 +09:00
Tatsuhiro Tsujikawa
8004ea9726
nghttpx: Return 400 if request CL is invalid or multiple CLs
2015-01-19 22:40:37 +09:00
Tatsuhiro Tsujikawa
e8053ac931
nghttpx: Check Content-Length only when Transfer-Encoding is not found
2015-01-19 21:16:47 +09:00
Tatsuhiro Tsujikawa
af24f8394e
nghttpx: Fix nghttp2 error code use in SPDY upstream
2015-01-17 21:35:36 +09:00
Tatsuhiro Tsujikawa
62b9e4bb56
nghttpx: Validate received request body length against content-length
2015-01-17 21:33:23 +09:00
Tatsuhiro Tsujikawa
441f1cc282
nghttpx: Validate received response body length against content-length
2015-01-17 21:33:23 +09:00
Tatsuhiro Tsujikawa
f92110c54c
nghttpx: Http2Upstream: Try to read data from backend if buffer is empty
2015-01-17 17:37:32 +09:00
Tatsuhiro Tsujikawa
3817798905
Compile with g++-4.7
...
g++-4.7 lacks thread_local, which can be workaround by
--disable-threads. What left remaining is std::map::emplace, which is
what this change deals with. First check availability of
std::map::emplace, if there is none, use std::map::insert.
2015-01-17 15:32:49 +09:00
Tatsuhiro Tsujikawa
13a14ecda8
nghttpx: Workaround IRIX's struct sockaddr which contains union
2015-01-17 14:59:24 +09:00
Tatsuhiro Tsujikawa
2b458666ba
nghttpd: Fix compiler warning
2015-01-16 23:22:10 +09:00
Tatsuhiro Tsujikawa
cbd878bbd5
nghttp, nghttpd: Allow unit for --header-table-size option
2015-01-16 00:07:52 +09:00
Tatsuhiro Tsujikawa
5f36d91afd
nghttp, nghttpd, h2load: Same indentation with nghttpx
2015-01-16 00:07:52 +09:00
Tatsuhiro Tsujikawa
a08ce38bcf
nghttpd: Cache date by comparing ev_now
2015-01-15 23:27:52 +09:00
Tatsuhiro Tsujikawa
5d204fc3aa
nghttpx: Add more option categories
2015-01-15 23:19:35 +09:00
Tatsuhiro Tsujikawa
84ead30e58
nghttpx: Remove NGHTTP2_HCAT_REQUEST halding since already handled in lib
2015-01-15 23:16:24 +09:00
Tatsuhiro Tsujikawa
b11e1afc91
nghttpx: Remove unused noop function
2015-01-15 23:14:25 +09:00
Tatsuhiro Tsujikawa
c3aa02f003
nghttpd: Use Http2Handler::submit_rst_stream
2015-01-15 23:11:14 +09:00
Tatsuhiro Tsujikawa
d142830109
nghttpd: Issue RST_STREAM if content-length does not match uploaded bytes
2015-01-15 23:07:25 +09:00
Tatsuhiro Tsujikawa
22e41bab3f
nghttpd: Issue RST_STREAM if received header field contains invalid chars
2015-01-15 22:45:18 +09:00
Tatsuhiro Tsujikawa
aa1c8d1fa4
nghttpx: Don't forward Trailer header field
2015-01-14 21:33:22 +09:00
Tatsuhiro Tsujikawa
1de20c1232
nghttpx: Ignore trailer headers in HTTP/1.1
2015-01-14 21:28:31 +09:00
Tatsuhiro Tsujikawa
8fe093de1d
nghttpx: Set initial backlog to 512
2015-01-14 21:24:12 +09:00
Tatsuhiro Tsujikawa
f004361ef2
nghttpx: Add --backend-request-buffer option
2015-01-13 23:30:28 +09:00
Tatsuhiro Tsujikawa
d6db38a318
nghttpx: Clean up integer configuration range checking
2015-01-13 23:23:35 +09:00
Tatsuhiro Tsujikawa
c88a5291b7
nghttpx: Add --backend-response-buffer option
2015-01-13 23:20:06 +09:00
Tatsuhiro Tsujikawa
0d614cf103
nghttpx: Longer help message
2015-01-13 23:02:18 +09:00
Tatsuhiro Tsujikawa
29d6cfae80
nghttpx: Add explanation about units in <SIZE>
2015-01-13 22:42:52 +09:00
Tatsuhiro Tsujikawa
c48a6e73e8
nghttpx: Clean up metavar
2015-01-13 22:39:35 +09:00
Tatsuhiro Tsujikawa
956c11388c
nghttpx: Allow units (k, m, and g) in --{read,write}-{rate,burst}
...
So that you can specify --read-rate=1M --read-burst=4M
2015-01-13 21:54:53 +09:00
Tatsuhiro Tsujikawa
5e8eb926f2
nghttpx: Fix server error with -n1 and --tls-ctx-per-worker
2015-01-13 21:53:53 +09:00
Tatsuhiro Tsujikawa
1e4f8f27fd
nghttpx: Add --tls-ctx-per-worker option
...
When same SSL_CTX is used by multiple thread simultaneously we have to
setup some number of mutex locks for it. We could not check how this
locking affects scalability since we have 4 cores at best in our
development machine. Good side of sharing SSL_CTX across threads is
we can share session ID pool.
If --tls-ctx-per-worker is enabled, SSL_CTX is created per thread
basis and we can eliminate mutex locks. The downside is session ID is
no longer shared, which means if session ID generated by one thread
cannot be acceptable by another thread. But we have now session
ticket enabled and its keys are shared by all threads.
2015-01-13 00:25:02 +09:00
Tatsuhiro Tsujikawa
0ea041e8cb
nghttpx: Add doc and clean up
2015-01-12 22:47:30 +09:00
Tatsuhiro Tsujikawa
e048deb64c
nghttpx: Fix error message
2015-01-12 22:35:45 +09:00
Tatsuhiro Tsujikawa
1c0fa46dfa
nghttpx: RateLimit: Use ev_timer_again for clarity
2015-01-11 00:32:08 +09:00
Tatsuhiro Tsujikawa
f7455d48cc
Compile with android NDK
...
This also fixes the bug that nghttpx's acceptor fd is blocking if
SOCK_NONBLOCK is undefined.
2015-01-11 00:28:00 +09:00
Tatsuhiro Tsujikawa
0ca979b453
nghttpx: Add --rlimit-nofile option
2015-01-10 23:17:48 +09:00
Tatsuhiro Tsujikawa
987aa2dd85
nghttpx: Define max iovcnt for http1 backend write operation
2015-01-10 23:04:54 +09:00
Tatsuhiro Tsujikawa
91b40d1e84
src: Add test for memchunk.h
2015-01-10 23:01:03 +09:00
Tatsuhiro Tsujikawa
bc17f95c80
src: Move ipv6_numeric_addr to util and add test
2015-01-10 21:33:53 +09:00
Tatsuhiro Tsujikawa
0069ca9ce8
nghttp: Fix compile error with libstdc++
2015-01-10 17:57:44 +09:00
Tatsuhiro Tsujikawa
1795d3ea27
nghttp: Add include file to clarify used objects
2015-01-10 16:44:09 +09:00
Tatsuhiro Tsujikawa
b933ee8e78
h2load: Don't retry connection on read error
...
Connection failure is handled by connected() and other errors lead to
just failure, no retry is needed.
2015-01-10 16:02:15 +09:00
Tatsuhiro Tsujikawa
a3dcf1e004
Produce man pages using sphinx
...
Previously to create manual page for bundled programs, we use help2man
to create man page from program's help output. Then our man2rst.py
script converts man page to rst document. Sphinx generates html from
rst documents.
Now help2rst.py produces rst document from programs output. We use
Sphinx solely to produce both man pages and html files.
2015-01-10 00:37:42 +09:00
Tatsuhiro Tsujikawa
19101f7f4a
Revert "nghttpx: Use smaller write buffer"
...
This reverts commit 742d80aac4
.
2015-01-09 20:55:39 +09:00
Tatsuhiro Tsujikawa
742d80aac4
nghttpx: Use smaller write buffer
2015-01-09 09:51:46 +09:00
Tatsuhiro Tsujikawa
473f1d71ff
src: Clear OpenSSL error queue before SSL_shutdown
2015-01-09 09:15:01 +09:00
Tatsuhiro Tsujikawa
8f40bd4675
nghttp, nghttpd, h2load: Clear OpenSSL error queue and handle renegotiation
2015-01-09 09:10:59 +09:00
Tatsuhiro Tsujikawa
7add262721
nghttpx: Detect TLS renegotiation after SSL_read and SSL_write
2015-01-09 00:49:27 +09:00
Tatsuhiro Tsujikawa
4a218f1b79
nghttpx: Clear OpenSSL error and handle limit change in read_tls
2015-01-09 00:08:34 +09:00
Tatsuhiro Tsujikawa
419c03daa2
nghttpx: Fix TLS write error
...
SSL_write requires the same arguments (buf pointer and its length) on
SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. get_write_limit() may
return smaller length than previously passed to SSL_write, which
violates OpenSSL assumption. To avoid this, we keep last legnth
passed to SSL_write to tls_last_writelen_ if SSL_write indicated I/O
blocking.
2015-01-08 23:03:56 +09:00
Tatsuhiro Tsujikawa
019f1e9fc7
nghttpx: Remove useless comments
2015-01-08 22:28:30 +09:00
Tatsuhiro Tsujikawa
53604782e5
nghttpx: Clean up worker_event handling
2015-01-08 22:24:29 +09:00
Tatsuhiro Tsujikawa
689e8c0ee3
nghttpx: Don't copy ticket_keys std::shared_ptr
2015-01-08 21:49:19 +09:00
Tatsuhiro Tsujikawa
0173929538
nghttpx: Rename ListenHandler as ConnectionHandler
2015-01-08 21:48:39 +09:00
Tatsuhiro Tsujikawa
f570757701
nghttpd: Fix data race when updating cached_date
2015-01-08 21:41:26 +09:00
Tatsuhiro Tsujikawa
5473e870eb
nghttpx: Use smaller buffer for reading
2015-01-08 21:28:52 +09:00
Tatsuhiro Tsujikawa
a41b7baf81
nghttpx: Handle NEW_CONNECTION event first
2015-01-08 21:20:17 +09:00
Tatsuhiro Tsujikawa
fcddb5c06c
nghttpx: Distribute session ticket keys to workers without mutex
2015-01-08 21:15:45 +09:00
Tatsuhiro Tsujikawa
5d3544185c
nghttpx: Fix crash in SSL_CTX_set_tlsext_ticket_key_cb
...
It seems that returning 0 when enc == 0 crashes OpenSSL.
2015-01-08 20:46:35 +09:00
Tatsuhiro Tsujikawa
5dce9501a6
Fix compile error with libstdc++ and/or --disable-threads
2015-01-08 01:57:59 +09:00
Tatsuhiro Tsujikawa
08e8cc1915
nghttpx: Add --tls-ticket-key-file option
...
This option specifies files contains 48 random bytes to construct
session ticket key data. This option can be used repeatedly to
specify multiple keys, but only the first one is used to encrypt
tickets.
2015-01-08 01:26:30 +09:00
Tatsuhiro Tsujikawa
52f3572d5b
nghttpx: Enable TLS session tickets with session key rotation every 12hrs
2015-01-08 00:01:09 +09:00
Tatsuhiro Tsujikawa
90914b38f1
nghttpx: Do not limit DATA frame length
2015-01-07 01:25:43 +09:00
Tatsuhiro Tsujikawa
8bfd900be5
src, examples: Check return value
2015-01-07 00:26:17 +09:00
Tatsuhiro Tsujikawa
40e8eaf5fd
nghttpx: Fix uninitialized pointer member
2015-01-07 00:25:42 +09:00
Tatsuhiro Tsujikawa
d3a606e9d9
nghttpx: open_file_for_write: Use O_CLOEXEC flag
2015-01-07 00:25:10 +09:00
Tatsuhiro Tsujikawa
2fb3d5fd1f
nghttpx: Remove Http2Upstream::deferred_ for now
2015-01-06 23:32:58 +09:00
Tatsuhiro Tsujikawa
ba795d86f0
nghttpx: Don't cache time for logging
...
Update is done by main event loop which is stopped after graceful
shutdown is commenced, which means time is no longer update. To avoid
this situation, we just avoid caching and get time for each logging.
2015-01-06 23:17:09 +09:00
Tatsuhiro Tsujikawa
e8107b68c8
nghttpx: Avoid std::chrono::high_resolution_clock as wall clock
...
This is because std::chrono::high_resolution_clock may not be wall
clock; it may be alias of std::chrono::stead_clock.
2015-01-06 23:10:11 +09:00
Tatsuhiro Tsujikawa
94e69d5e30
nghttpx: Remove commented lines
2015-01-06 22:55:01 +09:00
Tatsuhiro Tsujikawa
d1391f1db7
nghttpx: Process buffered data first without reading additional data
2015-01-06 22:48:17 +09:00
Tatsuhiro Tsujikawa
b9174b828e
nghttpx: Use util::make_socket_closeonexec instead of calling fcntl
2015-01-06 22:03:44 +09:00
Tatsuhiro Tsujikawa
a6cf6c00ea
nghttpx: Add SSL_read/write error logging
2015-01-06 22:02:24 +09:00
Tatsuhiro Tsujikawa
f6097ce6d0
nghttp: Fix compile error with openssl >= 1.0.2
2015-01-06 01:40:24 +09:00
Tatsuhiro Tsujikawa
dcdbd5ab20
h2load: Fix wrong kbytes/s value
2015-01-06 01:24:03 +09:00
Tatsuhiro Tsujikawa
cbc02bbc4c
nghttpx: Code cleanup
2015-01-06 00:51:52 +09:00
Tatsuhiro Tsujikawa
b5796c6b96
nghttp: Add missing initialization Request::res_hdidx on res_nva.clear()
2015-01-06 00:51:18 +09:00
Tatsuhiro Tsujikawa
d80952a2bc
nghttpx: Implement stream level timeout using ev_timer
2015-01-06 00:30:57 +09:00
Tatsuhiro Tsujikawa
f26d436ee6
src: http2::lookup_token: Don't need to make char lowcase
2015-01-05 18:17:52 +09:00
Tatsuhiro Tsujikawa
9854e3746f
src: Fix compile error with libstdc++
2015-01-05 16:20:35 +09:00
Tatsuhiro Tsujikawa
7a50299cb0
nghttpx: Handle connect error
2015-01-05 16:14:10 +09:00
Tatsuhiro Tsujikawa
7dba426db4
nghttpx: Use accept if accept4 is not available
2015-01-05 16:04:28 +09:00
Tatsuhiro Tsujikawa
fcf0ceeac6
nghttpd: Make use of accept4
2015-01-05 15:59:51 +09:00
Tatsuhiro Tsujikawa
e253d8f6db
h2load: Retry next address when connection cannot be established
2015-01-05 01:56:02 +09:00
Tatsuhiro Tsujikawa
8fb544523c
nghttpx: Fix HTTP/2 settings timer for HTTP/2 backend
2015-01-05 01:46:41 +09:00
Tatsuhiro Tsujikawa
3ae44ef2f3
nghttpd, nghttpx: Rework incoming header handling
2015-01-05 01:46:41 +09:00
Tatsuhiro Tsujikawa
730d47f7ad
src: Add unittest for http2::index_header
2015-01-03 22:03:00 +09:00
Tatsuhiro Tsujikawa
ea0ab938c4
src: Only index header in lowercase
2015-01-03 21:56:59 +09:00
Tatsuhiro Tsujikawa
8e3406ad20
nghttpd: Use faster request header handling
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
db6eec653b
Fix errors reported by scan-build
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
c654549d35
nghttpx: Remove commented code
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
645897503d
nghttpx: Reset buffer on empty
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
fe8f2a4603
nghttpd: Use larger write buffer
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
0a4330ee3c
nghttpd: Fix handling pending data and rename rb_ as wb_
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
d157744fb2
nghttpx: Fix handling of pending data
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
82320d6e55
nghttpd: Reset write buffer on empty
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
7db1864766
nghttpx: Add --backend-http1-connections-per-frontend option
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
a55a07940c
nghttpx: Show not implemented warning for per wroker rate limit
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
37c01a0a4d
nghttpx: Remove unused IOControl::set_lim
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
2003be8dc5
src: Fix unit tests failure
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
bfac015d61
src: Use libev for rest of the applications
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
cd7258a7cd
Use libev for nghttpd
...
Benchmark shows 10% faster with libev compared to libevent. Also
response time in high load condition is much faster.
2015-01-03 00:19:41 +09:00
Tatsuhiro Tsujikawa
ab1dd11705
nghttpd: Fix typo :host, which should be host
2014-12-25 00:49:36 +09:00
Tatsuhiro Tsujikawa
7bf5be9c17
nghttpd: Reserve 10 headers for request headers
2014-12-24 01:05:12 +09:00
Tatsuhiro Tsujikawa
ac11ba32ee
nghttpd: Use stack allocated array for headers in submit_file_response
2014-12-24 00:56:25 +09:00
Tatsuhiro Tsujikawa
a20ad03f7b
nghttpd: Use evbuffer_pullup(input, -1) cause buffer is most likely just one
2014-12-24 00:46:04 +09:00
Tatsuhiro Tsujikawa
292f219900
nghttpd: Avoid sending last 0-sized DATA
2014-12-24 00:31:21 +09:00
Tatsuhiro Tsujikawa
55e550f08f
nghttpd: Remove unused variable
2014-12-24 00:23:01 +09:00
Tatsuhiro Tsujikawa
32943a74b2
nghttpd: Just use socket send buffer and don't count our own buffer size
2014-12-24 00:19:16 +09:00
Tatsuhiro Tsujikawa
89291e4010
nghttpx: Improve priority handling in http2 upstream
2014-12-23 17:45:57 +09:00
Kazuho Oku
45d0d731eb
fill-in `data_stat` after copying the request entity into the temporary file
2014-12-22 07:26:02 +09:00
Kazuho Oku
125f62b71e
unlink the temporary file immediately after calling mkstemp
2014-12-22 07:24:36 +09:00
Kazuho Oku
eb6ba2a703
copy the request entity to temporary file if the source is stdin and if it is not a regular file
2014-12-21 14:06:44 +09:00
Tatsuhiro Tsujikawa
39eb1e4753
nghttp: Adjust priority upon upgrade
2014-12-19 23:33:13 +09:00
Tatsuhiro Tsujikawa
079682f313
deflatehd: Fix crash
2014-12-19 23:23:42 +09:00
Tatsuhiro Tsujikawa
eb8138bfbd
nghttp: Advance next stream ID only when --idle-dep is used
2014-12-17 23:36:29 +09:00
Tatsuhiro Tsujikawa
adc22ec80b
nghttp: Print failed address
2014-12-17 00:26:41 +09:00
Tatsuhiro Tsujikawa
d695d2ccc0
nghttp, nghttpx, nghttpd, h2load: Support h2-16 in NPN/ALPN
...
The nghttp2 library itself is still h2-14. To experiment with the
implementations to require h2-16 to test new features (e.g.,
prioritization), nghttp, nghttpx, nghttpd and h2load now support h2-16
as well as h2-14. Cleartext HTTP Upgrade is still limited to h2-14
however.
2014-12-16 22:57:58 +09:00
Tatsuhiro Tsujikawa
5fa9dd7cd5
nghttpx: Remove unused variable
2014-12-16 01:10:54 +09:00
Tatsuhiro Tsujikawa
b352ae03a9
src: Fix undefined reference error
2014-12-16 01:09:19 +09:00
Tatsuhiro Tsujikawa
c93da867e0
nghttpx: Fix bug SPDY upstream requires content-length if no FIN in SYN_STREAM
2014-12-15 23:42:59 +09:00
Tatsuhiro Tsujikawa
556811ec64
nghttpx: Don't connect backend if connection is not establish up front
2014-12-15 23:34:00 +09:00
Tatsuhiro Tsujikawa
403ece66e3
nghttpd: Fail if listen failed
2014-12-15 23:17:50 +09:00
Tatsuhiro Tsujikawa
9a35dbc4ab
src: Just check emptiness for value since spaces around value are stripped
2014-12-15 23:14:07 +09:00
Tatsuhiro Tsujikawa
6f70a53da6
src: http2::add_header: strip white spaces in value
2014-12-15 23:04:45 +09:00
Tatsuhiro Tsujikawa
93ee9e30d8
nghttp, h2load: Use recommended ciphers and assign sane SSL_CTX options
2014-12-13 01:37:57 +09:00
Tatsuhiro Tsujikawa
a84c319d62
src: Print stream ID in priority field as dep_stream_id
2014-12-13 01:20:58 +09:00
Tatsuhiro Tsujikawa
467b419947
nghttp: Add --dep-idle option to create anchor idle node for dependency
2014-12-13 01:19:27 +09:00
Tatsuhiro Tsujikawa
e4c59dd164
nghttpd: Fix next_session_id_ is not incremented
2014-12-10 01:21:12 +09:00
Tatsuhiro Tsujikawa
dce20c3e6a
nghttpx: Check HTTP/2 downstream connection after certain idle time
...
Previously when requests are issued to HTTP/2 downstream connection,
but it turns out that connection is down, handlers of those requests
are deleted. In some situations, we only know connection is down when
we write something to network, so we'd like to handle this kind of
situation in more robust manner. In this change, certain seconds
passed after last network activity, we first issue PING frame to
downstream connection before issuing new HTTP request. If writing
PING frame is failed, it means connection was lost. In this case,
instead of deleting handler, pending requests are migrated to new
HTTP2/ downstream connection, so that it can continue without
affecting upstream connection.
2014-12-09 21:41:29 +09:00
Tatsuhiro Tsujikawa
c0ffed7788
Support custom memory allocator
...
nghttp2_mem structure is introduced to hold custom memory allocator
functions and user supplied pointer. nghttp2_mem object can be passed
to nghttp2_session_client_new3(), nghttp2_session_server_new3(),
nghttp2_hd_deflate_new2() and nghttp2_hd_inflate_new2() to replace
standard malloc(), free(), calloc() and realloc(). nghttp2_mem
structure has user supplied pointer mem_user_data which can be used as
per session/object memory pool.
2014-12-08 00:55:55 +09:00
Tatsuhiro Tsujikawa
b607a22076
nghttpx: Support multiple HTTP/1 backend address
...
For HTTP/1 backend, -b option can be used several times to specify
multiple backend address. HTTP/2 backend does not support multiple
addresses and only uses first address even if multiple addresses are
specified.
2014-12-06 19:30:27 +09:00
Tatsuhiro Tsujikawa
b8dafbdf5e
nghttpx: Pass NI_NUMERICSERV to getnameinfo to get numeric service name
2014-12-06 01:07:05 +09:00
Tatsuhiro Tsujikawa
3b03ff626a
nghttpx: Don't log access log for blocked streams
2014-12-05 21:29:31 +09:00
Tatsuhiro Tsujikawa
9614611969
nghttpx: Limit # of downstream connections per host when h2 proxy is used
...
This commit limits the number of concurrent HTTP/1 downstream
connections to same host. By defualt, it is limited to 8 connections.
--backend-connections-per-frontend option was replaced with
--backend-http1-connections-per-host, which changes the maximum number
of connections per host. This limitation only kicks in when h2 proxy
is used (-s option).
2014-12-05 01:47:03 +09:00
Tatsuhiro Tsujikawa
f178b78816
nghttpx: Longer read timeouts
2014-12-03 23:45:44 +09:00
Tatsuhiro Tsujikawa
e180d8e594
nghttpx: Longer downstream HTTP/1 idle connection timeout
2014-12-03 23:00:53 +09:00
Tatsuhiro Tsujikawa
cbb5da5285
nghttpx: Fix --backend-http-proxy-uri does not work
2014-12-02 03:03:14 +09:00
Tatsuhiro Tsujikawa
03877c3752
asio-lib: Put ${AM_CPPFLAGS} before ${BOOST_CPPFLAGS}
2014-12-01 23:20:53 +09:00
Tatsuhiro Tsujikawa
54a3209cf5
configure.ac: Rename some variables so that they follow automake convention
2014-12-01 23:14:28 +09:00
Tatsuhiro Tsujikawa
7036859823
Do not change user variable CFLAGS in configure.ac
2014-12-01 23:06:11 +09:00
Tatsuhiro Tsujikawa
dcc7b23980
nghttpx: Remove cipher suite requirement
...
This makes the library h2-16 compatible now.
2014-11-30 22:52:34 +09:00
Tatsuhiro Tsujikawa
b9667fd209
asio: Listen to all resolved addresses
2014-11-30 22:39:16 +09:00
Tatsuhiro Tsujikawa
204ff787fa
nghttpx: Submit RST_STREAM if HEADERS appears in the middle of a stream
2014-11-28 00:23:46 +09:00
Tatsuhiro Tsujikawa
b1f807abd1
Reformat lines with clang-format-3.5
2014-11-27 23:56:30 +09:00
Tatsuhiro Tsujikawa
c67ccad74d
nghttpx: Use cached get_config()->pid in save_pid()
2014-11-27 22:41:14 +09:00
Tatsuhiro Tsujikawa
04dae32509
nghttpx: Store PID to Config again after daemon()
2014-11-27 21:32:34 +09:00
Tatsuhiro Tsujikawa
e11834d1c9
src: Add code in case struct tm.tm_gmtoff is not available
2014-11-24 18:39:35 +09:00
Tatsuhiro Tsujikawa
9bba616426
nghttpx: Add $alpn variable to accesslog formatting
...
$alpn is a variable which represents ALPN identifier of the protocol
which generates the response.
2014-11-24 15:24:09 +09:00
Tatsuhiro Tsujikawa
1fe50f272b
nghttpx: Add $pid to --accesslog-format variable
...
$pid refers to the PID of the running process.
2014-11-24 14:34:43 +09:00
Tatsuhiro Tsujikawa
93023acc6c
nghttpx: Make --accesslog-format usage doc help2man friendly
...
This is unfortunate but help2man behaves badly when there is indented
lines in help messages in commnad-line args. We removed indentations
to make help2man happy.
2014-11-24 14:16:48 +09:00
Tatsuhiro Tsujikawa
daf659c64e
nghttpx: Note the conversion made in <VAR>
2014-11-24 14:04:37 +09:00
Tatsuhiro Tsujikawa
de2a855572
Implement faster formatting for format_iso8601 and format_common_log
2014-11-24 14:00:52 +09:00
Lucas Pardue
6e178653a5
fixed conflict
2014-11-23 21:10:51 +00:00
Lucas Pardue
9cf1a0c77c
Add features to logging, client and server port,
...
time_iso8601 and request_time.
2014-11-23 20:37:51 +00:00
Tatsuhiro Tsujikawa
74ec1d3377
nghttpx: Write accesslog when upstream connection is lost for HTTP/2 and SPDY
2014-11-23 17:24:23 +09:00
Tatsuhiro Tsujikawa
1e4f288a7c
nghttpx: Remove misleading logging
2014-11-23 16:45:36 +09:00
Tatsuhiro Tsujikawa
ecd143fcc2
nghttpx: Send RST_STREAM with NO_ERROR when closing upgraded connection
2014-11-22 23:13:29 +09:00
Tatsuhiro Tsujikawa
bd9389b956
nghttpx: Refactor http2_data_read_callback
2014-11-22 21:12:28 +09:00
Tatsuhiro Tsujikawa
1a09cef0ef
nghttpx: Avoid 0-length DATA in HTTP/2 upstream
2014-11-22 21:12:28 +09:00
Tatsuhiro Tsujikawa
bded1d1115
h2load: Support ALPN
2014-11-22 01:13:18 +09:00
Tatsuhiro Tsujikawa
fa4f03525e
nghttp: Fix compile error and warning with libc++
2014-11-22 00:37:37 +09:00
Tatsuhiro Tsujikawa
ee65dea8af
nghttp: Fix compile error without libjansson
2014-11-19 21:18:31 +09:00
Tatsuhiro Tsujikawa
27609327ee
nghttpx: Fix heap-after-free crash in https upstream
...
Add Upstream::on_handler_delete() hook to safely write log for
HttpsUpstream.
2014-11-19 01:59:09 +09:00
Tatsuhiro Tsujikawa
958cd0de64
nghttpx: Add configurable access logging format
...
This commit adds functionality to customize access logging format in
nghttpx. The format variables are inspired by nginx. The default
format is combined format.
2014-11-19 01:29:55 +09:00
Tatsuhiro Tsujikawa
1d7601edfb
nghttpx: Better handling EOF from downstream connection to tunnel stream
2014-11-18 00:03:52 +09:00
Tatsuhiro Tsujikawa
8a0fdcfea9
nghttpd: Fix crash
2014-11-17 19:01:06 +09:00
Tatsuhiro Tsujikawa
75a1ad8bdb
src: format_iso8601: Fix invalid millisecond formatting
2014-11-16 17:32:35 +09:00
Tatsuhiro Tsujikawa
54232c6542
nghttp: Add --no-dep option to disable sending priority hints to server
2014-11-15 23:42:26 +09:00
Tatsuhiro Tsujikawa
ee2856f9bc
nghttp: Update doc
2014-11-15 23:34:37 +09:00
Tatsuhiro Tsujikawa
737cea0b38
nghttp: Add -r, --har option to output HTTP transactions in HAR format
2014-11-15 23:34:10 +09:00
Tatsuhiro Tsujikawa
a2bc88f6db
nghttpx: Check max length of ALPN field
2014-11-14 23:19:16 +09:00
Tatsuhiro Tsujikawa
5ce8ae79f0
nghttpx: Disable spdy/3 and spdy/2 by default
2014-11-14 23:16:06 +09:00
Tatsuhiro Tsujikawa
d98e9a63d0
src: Refactor code around ALPN setup
2014-11-14 23:14:39 +09:00
Tatsuhiro Tsujikawa
8e30adbca0
asio: Add http2::backlog API function
2014-11-10 23:26:01 +09:00
Tatsuhiro Tsujikawa
9adfd08848
asio_http2_handler: Use util::utos instead of std::to_string
2014-11-10 22:39:20 +09:00
Tatsuhiro Tsujikawa
2e3419ccbb
nghttpd: Cache formatted date string
2014-11-10 22:35:08 +09:00
Tatsuhiro Tsujikawa
5b6b6dc1b7
src: Rewrite http_date
2014-11-10 21:53:19 +09:00
Tatsuhiro Tsujikawa
d0271a90b5
nghttpd: Use util::utos instead of slow util::to_str
2014-11-10 21:23:26 +09:00
Tatsuhiro Tsujikawa
2ba9a009fe
nghttpd: Fix resource leak
2014-11-08 23:07:40 +09:00
Tatsuhiro Tsujikawa
80b361dbb0
nghttpx: Use exit instead of abort for DIE macro
2014-11-08 21:38:57 +09:00
Tatsuhiro Tsujikawa
58254adb11
h2load: Print used SSL/TLS cipher name and parameters
2014-11-08 21:24:24 +09:00
Tatsuhiro Tsujikawa
ce71e65aee
nghttpx: Replace WARNING with WARN for consistency
2014-11-08 10:51:56 +09:00
Tatsuhiro Tsujikawa
1119701071
nghttpx: Fix -L option help message
...
WARNING should be WARN.
2014-11-08 10:45:58 +09:00
Tatsuhiro Tsujikawa
c410f4055f
Merge branch 'log_notice' of https://github.com/LPardue/nghttp2 into LPardue-log_notice
2014-11-07 21:15:02 +09:00
Tatsuhiro Tsujikawa
1e86635572
h2load: Make shutdown sequence simpler
2014-11-07 00:28:10 +09:00
Lucas Pardue
a067eb02a5
Add LOG_NOTICE level logging for application lifecycle events
2014-11-06 14:32:56 +00:00
Tatsuhiro Tsujikawa
154876a17b
nghttpx: Apply TLS record length limit to DATA frame payload
...
This is not obvious but it makes intermediaries flush and forward DATA
frame boundary without excessive buffering. Since we have different
TCP connections frontend and backend, this may not work. This is
still experimental.
2014-11-06 21:14:14 +09:00
Tatsuhiro Tsujikawa
f8c70993c0
nghttpx: Adjust TLS record size dynamically
...
Use the same behaviour the current Google server does: start with 1300
TLS record size and after transmitting 1MiB, change record size to
16384. After 1 second idle time, reset to 1300. Only applies to
HTTP/2 and SPDY upstream connections.
2014-11-06 02:36:53 +09:00
Tatsuhiro Tsujikawa
03a2828fcf
src: Disable SSL_MODE_ENABLE_PARTIAL_WRITE for apps which use libevent
2014-11-05 01:15:38 +09:00
Tatsuhiro Tsujikawa
2fc0056ada
nghttp: Allow multiple -v option to increase verbosity
...
Now the number of -v option specifies verbosity level. Current all
verbose output are turned on for at lest one -v option, except for the
debug output for each data chunk which is only turned on more than one
-v options.
2014-11-05 00:42:12 +09:00
Tatsuhiro Tsujikawa
29fcd7c946
nghttpd: Use http2::Headers
2014-11-02 23:33:04 +09:00
Tatsuhiro Tsujikawa
189f122dd7
nghttpd: Perform redirect if directory is requested
2014-11-02 23:27:38 +09:00
Tatsuhiro Tsujikawa
7d282cd0bd
Code cleanup
2014-10-30 23:31:28 +09:00
Tatsuhiro Tsujikawa
4d93dd9d91
Upate to draft-15
...
* Add NGHTTP2_HTTP_1_1_REQUIRED error code
* Allow transmission of WINDOW_UPDATE on reserved (remote)
* Allow reception of WINDOW_UPDATE on reserved (local)
* Treat frame larger than MAX_FRAME_SIZE as FRAME_SIZE_ERROR
ALPN identifier is still h2-14 to continue interop, since draft-14 and
-15 are binary compatible. The new error code was added in draft-15,
but HTTP/2 allows extensions can freely add new error code, so it is
not a problem.
2014-10-30 22:40:02 +09:00
Tatsuhiro Tsujikawa
be1a513c59
nghttpx: Shut up scan-build
2014-10-30 22:36:22 +09:00
Tatsuhiro Tsujikawa
20900b133e
nghttpx: Fix heap-use-after-free in ClientHandler object
...
This bug was found by scan-build
2014-10-30 21:47:38 +09:00
Tatsuhiro Tsujikawa
0ef99b90d9
asio-lib: Make request_cb take const ref and use int64_t as http_date arg
2014-10-28 01:01:48 +09:00
Tatsuhiro Tsujikawa
7fa0f2763e
nghttpx: Update Alt-Svc header field spec to alt-svc-04
2014-10-28 00:17:32 +09:00
Tatsuhiro Tsujikawa
6933e0ef54
h2load: Use Headers instead of std::vector<std::pair<>> to store custom headers
2014-10-27 21:23:36 +09:00
Tatsuhiro Tsujikawa
a9ecdca08a
h2load: Read URIs from stdin if -i- is used
2014-10-27 21:23:36 +09:00
Tatsuhiro Tsujikawa
af5bedd45f
h2load: Move code pasing URIs to separate function
2014-10-27 21:23:36 +09:00
Tatsuhiro Tsujikawa
7097a31968
h2load: Uniform handling of URIs from command-line and file
2014-10-27 21:23:36 +09:00
Tatsuhiro Tsujikawa
4122920dc6
h2load: Fix doc and remove trailing spaces
2014-10-27 21:23:36 +09:00
Lucas Pardue
9ea4905f68
Added X-Forwarded-For header stripping option to nghttpx
2014-10-27 10:23:20 +00:00
Tatsuhiro Tsujikawa
c6cfcc3c30
src: Disable insecure SSLv3
2014-10-22 23:14:07 +09:00
Tatsuhiro Tsujikawa
566a252577
Merge branch 'header_add_override' of https://github.com/kennypeng/nghttp2 into kennypeng-header_add_override
2014-10-22 21:25:53 +09:00
Kenny (kang-yen) Peng
27c766cb04
fix some comments and descriptions
2014-10-21 22:38:45 +00:00
Kenny (kang-yen) Peng
41dd6d0205
use option i to accept input URI list file
2014-10-21 22:29:36 +00:00
Kenny (kang-yen) Peng
db071ca35c
fix comments of header add/override
2014-10-21 21:25:38 +00:00