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