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
Http compression only working when using localhost #26980
Comments
Quick test I did on 5.6.2:
Now testing with curl with no
The test but with
I have the same result if I use |
It indeed compresses on hosts other than localhost when issuing the requests with curl, however when using postman or a web browser it does not. Not really sure what this could be caused by. |
I'm going to close this issue then. |
Any insight as to why it only compresses responses when sending with curl and not with postman, chrome, firefox, etc. would be greatly appreciated. |
These tools adds extra headers to the HTTP request. You can see that on Firefox or Chrome by opening the "Development Tools" and look at the network tabs. curl won't alter the HTTP request so it is the easiest way to send appropriate headers and see the HTTP response. |
Elasticsearch version (
bin/elasticsearch --version
): 5.5.2, 5.6.0, 5.6.2Plugins installed: []
JVM version (
java -version
): 1.8.0_131, 1.8.0_144OS version (
uname -a
if on a Unix-like system): 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux. Windows 10.Description of the problem including expected versus actual behavior:
Expected behaviour is that if http.compression is not turned off and a request is made with the Accept-Encoding header that responses are compressed and that the content-encoding header is set with the correct encoding type, regardless of the host address.
Responses are only compressed when issuing requests to localhost. When using another address (local ip address, 127.0.0.1) no Content-Encoding header is sent and responses are not compressed.
Steps to reproduce:
Install elastic and specify two network.hosts addresses. [localhost, local ip address]
Visit localhost:9200/_nodes/settings?pretty and localipaddress:9200/_nodes/settings?pretty and view the response headers.
Localhost
content-type: application/json; charset=UTF-8
content-encoding: gzip
content-length: 549
content-type:application/json; charset=UTF-8
The text was updated successfully, but these errors were encountered: