Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 16, 2017

Conversation

karalabe
Copy link
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
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.

None yet

2 participants