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

Support for Vary header in response headers. #105

Open
INRIX-Xiaodi-Huang opened this issue Mar 13, 2017 · 0 comments
Open

Support for Vary header in response headers. #105

INRIX-Xiaodi-Huang opened this issue Mar 13, 2017 · 0 comments

Comments

@INRIX-Xiaodi-Huang
Copy link

INRIX-Xiaodi-Huang commented Mar 13, 2017

I make the following request through unirest to get an image.
Request Headers
view source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Encoding:gzip, deflate, sdch, br
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:_ga=*************************
Host:blah.blah.com
If-None-Match:d41d8cd98f00b204e9800998ecf8427e
Upgrade-Insecure-Requests:1
User-Agent:*******************
Query String Parameters
view source
view URL encoded
format:sugar-html-json
platform:base
_hash:4f52279c-0796-11e7-8cc2-02135a7c6b1f

The response is:
Request URL:*****************************
Request Method:GET
Status Code:304 Not Modified
Remote Address:********************
Response Headers
view source
Cache-Control:max-age=0, private
Connection:keep-alive
Date:Mon, 13 Mar 2017 02:43:04 GMT
Expires:
Server:Apache
Vary:Accept-Encoding

Since content-encoding is missing from response headers, unirest doesn't unzip the response. I have no trouble seeing the image in browsers. Likewise if I leave accept-encoding header blank in my request, I am able to get the image in unirest.

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

No branches or pull requests

1 participant