-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[console] support HEAD requests #10611
Conversation
jenkins, test this |
Is it possible to include the warning headers in the response too? |
2bbb1ff
to
9bf43b2
Compare
Hapi handles HEAD requests automatically (by ignoring the body of a GET response) which prevents the console proxy from handling them correctly. To fix this the console proxy now only accepts requests with the POST method and requires the path and method in the query string.
9bf43b2
to
5e932e4
Compare
Good catch @jbudz, fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice coding spalger, I gave this thorough pass and it looks close.
Two small items,
lint errors look legitimate
should the HEAD requests return content length?
Fixed the lint errors. As far as I can tell hapi calculates the content-length automatically (that is to say it removes it and uses chunked encoding) but I'm not sure why... |
jenkins, test this |
Backports PR #10611 **Commit 1:** [console] support HEAD requests Hapi handles HEAD requests automatically (by ignoring the body of a GET response) which prevents the console proxy from handling them correctly. To fix this the console proxy now only accepts requests with the POST method and requires the path and method in the query string. * Original sha: d0aec25 * Authored by spalger <[email protected]> on 2017-02-28T02:03:23Z **Commit 2:** [console] proxy 'Warning' header from es * Original sha: 5e932e4 * Authored by spalger <[email protected]> on 2017-03-24T05:01:38Z **Commit 3:** Merge branch 'master' of github.com:elastic/kibana into fix/console-head-requests * Original sha: 3145506 * Authored by spalger <[email protected]> on 2017-03-28T23:04:50Z **Commit 4:** [console] fix lint errors * Original sha: c4f4bd8 * Authored by spalger <[email protected]> on 2017-03-28T23:08:42Z
Backports PR #10611 **Commit 1:** [console] support HEAD requests Hapi handles HEAD requests automatically (by ignoring the body of a GET response) which prevents the console proxy from handling them correctly. To fix this the console proxy now only accepts requests with the POST method and requires the path and method in the query string. * Original sha: d0aec25 * Authored by spalger <[email protected]> on 2017-02-28T02:03:23Z **Commit 2:** [console] proxy 'Warning' header from es * Original sha: 5e932e4 * Authored by spalger <[email protected]> on 2017-03-24T05:01:38Z **Commit 3:** Merge branch 'master' of github.com:elastic/kibana into fix/console-head-requests * Original sha: 3145506 * Authored by spalger <[email protected]> on 2017-03-28T23:04:50Z **Commit 4:** [console] fix lint errors * Original sha: c4f4bd8 * Authored by spalger <[email protected]> on 2017-03-28T23:08:42Z
Hapi handles HEAD requests automatically (by ignoring the body of a GET response) which prevents the console proxy from handling them correctly. To fix this the console proxy now only accepts requests with the POST method and requires the path and method in the query string.