ywkaras commented on code in PR #9432:
URL: https://github.com/apache/trafficserver/pull/9432#discussion_r1119494183
##########
plugins/experimental/webp_transform/ImageTransform.cc:
##########
@@ -183,7 +183,7 @@ class GlobalHookPlugin : public GlobalPlugin
// If we might need to convert check to see if what the browser supports
if (transaction_convert_to_webp == true || transaction_convert_to_jpeg ==
true) {
- std::string accept =
transaction.getServerRequest().getHeaders().values("Accept");
+ std::string accept =
transaction.getClientRequest().getHeaders().values("Accept");
bool webp_supported = accept.find("image/webp") != std::string::npos;
Review Comment:
Seems wrong that we just assume the client will accept "image/jpeg"
regardless of what's in the accept header the client sent.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]