chia7712 commented on code in PR #757:
URL: https://github.com/apache/yunikorn-core/pull/757#discussion_r1521872944


##########
pkg/webservice/handlers.go:
##########
@@ -1216,3 +1227,40 @@ func getStream(w http.ResponseWriter, r *http.Request) {
                }
        }
 }
+
+func checkHeader(h http.Header, key string, value string) bool {

Review Comment:
   > NO. We should never return an error to the client if it request an 
encoding we don't understand. Accept-Encoding: identity is the default, which 
means the identity encoding is always allowed. Therefore, if an unacceptable 
encoding is requested, we simply send the request uncompressed and without a 
Content-Encoding: gzip header.
   
   That is an acceptable way to me, but I'd like to have more discussion for my 
own education :)
   
   Should we support full representation of `Accept-Encoding` ( `weight` and 
`coding` )? If yes, we need to consider the `Accept-Encoding: gzip;q=1.0, 
identity; q=0`.
   
   Or we ignore the `weight` and only check the existence of `gzip` from the 
`Accept-Encoding`. This is the solution adopted by this PR.



-- 
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]

Reply via email to