Skip to content

rpc: allow dumb empty requests for AWS health checks#15496

Merged
karalabe merged 1 commit into
ethereum:masterfrom
karalabe:rpc-get-healthcheck
Nov 16, 2017
Merged

rpc: allow dumb empty requests for AWS health checks#15496
karalabe merged 1 commit into
ethereum:masterfrom
karalabe:rpc-get-healthcheck

Conversation

@karalabe
Copy link
Copy Markdown
Member

@karalabe karalabe commented Nov 16, 2017

A while back, in #15220 we've introduced an extra limitation in our HTTP RPC to reject all requests that do not have application/json as the content type. This was needed to prevent the circumvention of CORS checks in certain browsers.

This however meant that dumb, empty HTTP GET requests now return a failure. Whilst this sounds a good idea, it also breaks the AWS load balancer health checks, as those simply issue a GET on load balanced ports and kill the backing services if they don't reply with 200 #15490.

This PR makes a special case exception, so that if someone sends an empty HTTP GET request to our HTTP RPC endpoint, instead of rejecting it, we just return immediately, causing a 200 code.

Copy link
Copy Markdown
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants