Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1543

server receives accept-encoding header even if client doesn't send

$
0
0

I am sending a curl request to an echo server ( echo.free.beeceptor.com ) and even I don't include accept-encoding header in request, echo server shows it received the header.

% curl -v https://echo.free.beeceptor.com                       *   Trying 147.182.252.2:443...* Connected to echo.free.beeceptor.com (147.182.252.2) port 443* ALPN: curl offers h2,http/1.1....< HTTP/2 200 < access-control-allow-origin: *< alt-svc: h3=":443"; ma=2592000< content-type: application/json< date: Tue, 02 Jul 2024 06:27:02 GMT< server: Caddy< vary: Accept-Encoding< {"method": "GET","protocol": "https","host": "echo.free.beeceptor.com","path": "/","ip": "115.110.154.68:62921","headers": {"Host": "echo.free.beeceptor.com","User-Agent": "curl/8.4.0","Accept": "*/*",    **"Accept-Encoding": "gzip"**  },"parsedQueryParams": {}

Does curl internally add this header? Which I don't think as same behaviour is seen on Postman. What logic can explain this?

Tried to look for Accept-encoding in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding but it also doesn't throw any light on this behaviour.


Viewing all articles
Browse latest Browse all 1543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>