You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "ywkaras (via GitHub)" <gi...@apache.org> on 2023/02/28 01:49:30 UTC

[GitHub] [trafficserver] ywkaras commented on a diff in pull request #9432: webp_transform plugin: Use Accept header from client request.

ywkaras commented on code in PR #9432:
URL: https://github.com/apache/trafficserver/pull/9432#discussion_r1119493377


##########
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");

Review Comment:
   The next few lines of code decide whether and how to transform the body of the response to client to a different content type.  So, it make more sense to look at what content types the client will accept, not what types we told the server ATS would accept.



-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org