Tatsuhiro Tsujikawa
fe8946ddc7
nghttpx: Fix bug that mruby is incorrectly shared between backends
...
Previously, mruby context is wrongly shared by multiple patterns if
the underlying SharedDownstreamAddr is shared by multiple
DownstreamAddrGroups. This commit fixes it.
2019-09-16 22:25:06 +09:00
Tatsuhiro Tsujikawa
f8933fe504
nghttpx: Reconnect h1 backend if it lost connection before sending headers
...
This is the second attempt. The first attempt was
8a59ce6d37
and it failed.
2019-09-07 18:20:24 +09:00
Tatsuhiro Tsujikawa
053c7ac588
nghttpx: Returns 408 if backend timed out before sending headers
2019-09-03 00:29:01 +09:00
Tatsuhiro Tsujikawa
319d5ab1c6
nghttpx: Fix request stall
...
Fix request stall if backend connection is reused and buffer is full.
2019-08-06 20:50:29 +09:00
Tatsuhiro Tsujikawa
0288093caf
Fix llhttp_get_error_pos usage
...
It returns NULL if return value is HPE_OK.
2019-04-21 00:07:11 +09:00
Tatsuhiro Tsujikawa
c64d2573dc
Replace http-parser with llhttp
...
llhttp does not include URL parser. We extracted URL parser code from
http-parser and put it under third-party/url-parser.
llhttp bd3d224eb8cdc92c6fc8f508d7bbe0ba266e8e92
2019-04-20 18:42:30 +09:00
Tatsuhiro Tsujikawa
be96654d56
nghttpx: Don't log authorization request header field value with -LINFO
2019-04-15 22:59:26 +09:00
Tatsuhiro Tsujikawa
1ff9de4c87
nghttpx: Backend address selection with weight
2019-01-21 22:23:19 +09:00
Tatsuhiro Tsujikawa
3c393dca58
nghttpx: Fix assertion failure on mruby send_info with HTTP/1 frontend
2018-11-15 10:17:41 +09:00
Tatsuhiro Tsujikawa
1b42110d4f
nghttpx: Make Downstream state enum class
2018-10-17 14:19:58 +09:00
Tatsuhiro Tsujikawa
0735ec55f3
nghttpx: Convert shrpx_connect_proto to enum class
2018-10-17 14:19:58 +09:00
Tatsuhiro Tsujikawa
f2159bc2c1
nghttpx: Convert UpstreamAltMode to enum class
2018-10-17 08:38:55 +09:00
Tatsuhiro Tsujikawa
ec5729b1fa
Use std::make_unique
2018-10-15 23:02:44 +09:00
Tatsuhiro Tsujikawa
46576178a3
Don't send Transfer-Encoding to pre-HTTP/1.1 clients
2018-10-14 22:57:54 +09:00
Tatsuhiro Tsujikawa
7c8cb3a0ce
nghttpx: Improve CONNECT response status handling
2018-10-04 12:04:15 +09:00
Tatsuhiro Tsujikawa
d2a594a753
nghttpx: Implement RFC 8441 Bootstrapping WebSocket with HTTP/2
2018-09-29 11:35:41 +09:00
Tatsuhiro Tsujikawa
32826466f5
nghttpx: Fix crash with API request
2018-08-24 23:07:16 +09:00
Tatsuhiro Tsujikawa
b574ae6aa2
nghttpx: Support per-backend mruby script
2018-08-23 18:13:29 +09:00
Tatsuhiro Tsujikawa
880f948684
Enable IndentPPDirectives
2018-06-09 16:21:30 +09:00
Tatsuhiro Tsujikawa
0028275d7b
nghttpx: Add affinity-cookie-secure parameter to backend option
2017-11-21 22:29:22 +09:00
Tatsuhiro Tsujikawa
b8fda6808b
nghttpx: Cookie based session affinity
2017-11-01 22:18:03 +09:00
Tatsuhiro Tsujikawa
a319143901
nghttpx: Fix bug that header fields are missing in HTTP/1.0 response
2017-10-22 01:11:32 +09:00
Tatsuhiro Tsujikawa
2576855ded
nghttpx: Send non-final response to HTTP/1.1 or HTTP/2 client only
2017-09-21 21:42:56 +09:00
Tatsuhiro Tsujikawa
a584cf5a4f
Use clang-format-4.0
2017-04-30 15:45:53 +09:00
Tatsuhiro Tsujikawa
d63b4c1034
nghttpx: Forward multiple via, xff, and xfp header fields
...
Previously, for Via, X-Forwarded-For, and X-Forwarded-Proto header
field, nghttpx only forwarded the last header field of each. With
this commit, nghttpx forwards all of them if it is configured to do
so.
2017-04-26 21:23:13 +09:00
Tatsuhiro Tsujikawa
e17a6b29b6
nghttpx: Use 502 as server error code
2017-04-01 14:04:55 +09:00
Tatsuhiro Tsujikawa
c7df65309b
nghttpx: Ignore further input if connection is going to close
2017-03-19 13:24:12 +09:00
Tatsuhiro Tsujikawa
9aee518352
nghttpx: Effectively revert ff64f64e1d
2017-03-15 00:07:57 +09:00
Tatsuhiro Tsujikawa
fa074145a4
Merge pull request #788 from nghttp2/nghttpx-h2-proxy-pattern-match
...
nghttpx: Enable backend pattern matching with http2-proxy
2017-03-06 21:22:34 +09:00
Tatsuhiro Tsujikawa
0c8b1a4f74
nghttpx: Fix bug that send_reply does not participate graceful shutdown
2017-02-21 21:27:57 +09:00
Tatsuhiro Tsujikawa
9d16292fe4
nghttpx: Add --frontend-max-requests option
2017-02-20 23:36:50 +09:00
Tatsuhiro Tsujikawa
a7c780a732
nghttpx: Redirect to HTTPS URI with redirect-if-not-tls param
...
This commit removes frontend-tls parameter, and adds
redirect-if-not-tls parameter parameter to --backend option. nghttpx
now responds to the request with 308 status code to redirect the
request to https URI if frontend connection is not TLS encrypted, and
redirect-if-no-tls parameter is used in --backend option. The port
number in Location header field is 443 by default (thus omitted), but
it can be configurable using --redirect-https-port option.
2017-02-18 22:32:27 +09:00
Tatsuhiro Tsujikawa
e5b84fad09
nghttpx: Fix bug that old config is used during reloading config
2017-02-16 22:46:22 +09:00
Tatsuhiro Tsujikawa
4bf3cb2cc0
Revert "nghttpx: Don't capitalize h1 header fields"
...
This reverts commit f994664934
.
2017-02-12 23:27:38 +09:00
Tatsuhiro Tsujikawa
c78528d54b
nghttpx: Restrict HTTP major and minor in 0 or 1
2017-02-11 18:42:29 +09:00
Tatsuhiro Tsujikawa
f994664934
nghttpx: Don't capitalize h1 header fields
2017-02-11 18:41:52 +09:00
Tatsuhiro Tsujikawa
bd97886d8e
nghttpx: Use stack allocated buffer instead of making std::string
2017-01-29 22:11:33 +09:00
Tatsuhiro Tsujikawa
3ddc446ba2
nghttpx: Enable backend pattern matching with http2-proxy
2017-01-26 01:04:27 +09:00
Tatsuhiro Tsujikawa
2fc2a27ac1
nghttpx: Use char instead of char[] if possible
2017-01-22 22:28:14 +09:00
Tatsuhiro Tsujikawa
33aa327ef5
nghttpx: Fix access.log timestamp
...
access.log timestamp is now when request header fields are received,
rather than when access log is written.
2017-01-11 20:47:17 +09:00
Tatsuhiro Tsujikawa
6595ae26ea
src: Add constexpr to const objects
2017-01-09 17:11:37 +09:00
Tatsuhiro Tsujikawa
4fa150c494
nghttpx: Use Memchunk based read buffer for frontend connection
...
Previously, we have dedicated read buffer for each frontend
connection. With this commit, the buffer spaces are only used when
needed, and pooled if they are not used. This reduces memory usage
for idle client connections.
2017-01-08 23:20:14 +09:00
Tatsuhiro Tsujikawa
c4aeadd57d
nghttpx: Retry h1 backend request if first write fails
2016-12-25 22:19:51 +09:00
Tatsuhiro Tsujikawa
e6b4454e48
Merge branch 'nghttpx-better-early-final-response-handling'
2016-12-24 23:02:52 +09:00
Tatsuhiro Tsujikawa
3226d21609
Merge pull request #755 from nghttp2/nghttpx-h1-frontend-keep-alive-timeout
...
nghttpx: Add frontend-keep-alive-timeout option
2016-12-24 23:01:17 +09:00
Tatsuhiro Tsujikawa
3d20c2dce6
nghttpx: Feed read event rather than calling on_read
...
on_read may fail, but we failed to check its return value most of the
places. This is because failure means deletion of ClientHandler, but
because of architecture, we cannot delete it. Feeding read event is
better since we can move call on_read from libev callback. We can
delete ClientHandler form there.
2016-12-24 22:57:59 +09:00
Tatsuhiro Tsujikawa
cd83d70e7b
nghttpx: Don't reset stream if we have already received response
2016-12-24 22:54:22 +09:00
Tatsuhiro Tsujikawa
a0ce5ea9ab
nghttpx: Keep reading after backend write failed
...
Because of bidirectional nature of TCP, we may fail write(2), but have
still pending read in TCP buffer, which may contain response body. To
forward them, we should keep reading until get EOF from backend.
To avoid stalling HTTP/1 upload when request buffer is full, and we
have received complete response from backend, drop connection in that
case.
2016-12-24 22:50:02 +09:00
Tatsuhiro Tsujikawa
3c600c103f
nghttpx: Add frontend-keep-alive-timeout option
2016-12-23 11:01:29 +09:00
Tatsuhiro Tsujikawa
ff64f64e1d
nghttpx: Faster HTTP/1 frontend
2016-11-29 20:42:27 +09:00