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