go-ethereum/node
Sina Mahmoodi f20eba426a
graphql, node, rpc: improve HTTP write timeout handling (#25457)
Here we add special handling for sending an error response when the write timeout of the
HTTP server is just about to expire. This is surprisingly difficult to get right, since is
must be ensured that all output is fully flushed in time, which needs support from
multiple levels of the RPC handler stack:

The timeout response can't use chunked transfer-encoding because there is no way to write
the final terminating chunk. net/http writes it when the topmost handler returns, but the
timeout will already be over by the time that happens. We decided to disable chunked
encoding by setting content-length explicitly.

Gzip compression must also be disabled for timeout responses because we don't know the
true content-length before compressing all output, i.e. compression would reintroduce
chunked transfer-encoding.
2022-12-07 14:02:14 +01:00
..
api.go node: prevent exposing engine API on unauthenticated endpoint (#25939) 2022-10-06 14:01:04 +02:00
api_test.go graphql, node, rpc: improve HTTP write timeout handling (#25457) 2022-12-07 14:02:14 +01:00
config.go node: drop support for static & trusted node list files (#25610) 2022-10-12 10:50:12 +02:00
config_test.go node: remove noop path.Join (#25475) 2022-08-04 10:42:03 +03:00
defaults.go core: eth: implement Kiln-v2 spec (#24506) 2022-03-17 17:20:03 +02:00
doc.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
endpoints.go node, rpc: add ReadHeaderTimeout config option (#25338) 2022-08-03 16:50:12 +02:00
errors.go node: refactor package node (#21105) 2020-08-03 19:40:46 +02:00
jwt_auth.go node, rpc: add JWT auth support in client (#24911) 2022-09-02 17:40:41 +02:00
jwt_handler.go node: change JWT error status to 401 Unauthorized (#25629) 2022-08-30 15:25:02 +02:00
lifecycle.go node: refactor package node (#21105) 2020-08-03 19:40:46 +02:00
node.go node: drop support for static & trusted node list files (#25610) 2022-10-12 10:50:12 +02:00
node_auth_test.go node, rpc: add JWT auth support in client (#24911) 2022-09-02 17:40:41 +02:00
node_example_test.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
node_test.go graphql, node, rpc: improve HTTP write timeout handling (#25457) 2022-12-07 14:02:14 +01:00
rpcstack.go graphql, node, rpc: improve HTTP write timeout handling (#25457) 2022-12-07 14:02:14 +01:00
rpcstack_test.go graphql, node, rpc: improve HTTP write timeout handling (#25457) 2022-12-07 14:02:14 +01:00
utils_test.go all: remove version field from rpc.API 2022-06-27 12:39:46 +02:00