bryancall edited a comment on issue #7099: URL: https://github.com/apache/trafficserver/issues/7099#issuecomment-672142929
@ywkaras It won't work since the origin doesn't recognize q values and will send back image/webp again, since it has image/webp in the accept header. It would however work if image/webp;q=0 is added before doing an ATS cache look up and then removed before going to the origin. I think we should just special case image/webp for now and remove it later in a few years. I have an internal PR up that has that type of logic. Example of the origin sending back `content-type: image/webp` with `Accept: image/webp;q=0` in the request: ``` $ curl -D - -o /dev/null -s -H 'Accept: image/webp;q=0,image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5' https://dlp31coh2a67q.cloudfront.net/eyJrZXkiOiJ1cGxvYWRzL21lZGl1bS9hc3NldC8xODE4L3Rlc2xhX3dpdGhfYV9yb3NlX29uX3RvcF9vZl9pdC5qcGciLCJidWNrZXQiOiJvc2xvLXByb2R1Y3Rpb24iLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjcwMCwiaGVpZ2h0IjpudWxsfX19 HTTP/2 200 content-type: image/webp content-length: 18472 date: Tue, 11 Aug 2020 17:54:50 GMT x-amzn-requestid: 70f95e04-b159-45e2-9c38-f4ede3d38153 last-modified: Wed, 22 Jul 2020 21:31:31 GMT access-control-allow-origin: * access-control-allow-headers: Content-Type, Authorization x-amz-apigw-id: RHc4sFKFiYcF2pg= cache-control: max-age=31536000,public access-control-allow-methods: GET x-amzn-trace-id: Root=1-5f32db6a-2865172535c54d6d87203e86;Sampled=0 access-control-allow-credentials: true x-cache: Hit from cloudfront via: 1.1 7eb3b782ab09047ce0d11ee03763894c.cloudfront.net (CloudFront) x-amz-cf-pop: SEA19-C2 x-amz-cf-id: 1HPCddByV7clafDzYTNPOxMcgpn_LM-ajvqyQfGh4jVwHnhZ-NvCuw== age: 2 ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
