[ 
https://issues.apache.org/jira/browse/MESOS-9451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16709355#comment-16709355
 ] 

Ilya Pronin edited comment on MESOS-9451 at 12/4/18 10:32 PM:
--------------------------------------------------------------

Per [RFC 7231|https://tools.ietf.org/html/rfc7231#section-5.3.4] 
{{Accept-Encoding}} header field is an advertisement that a particular encoding 
is supported by the requester. The server may still use {{identity}} encoding 
(no encoding) unless the client forbids it with {{identity;q=0}}.

I think it's OK for libprocess to continue to apply body length threshold as 
long as it checks that {{identity}}'s weight is not 0.


was (Author: ipronin):
Per [RFC 7231|https://tools.ietf.org/html/rfc7231#section-5.3.4] 
{{Accept-Encoding}} header field is an advertisement that a particular encoding 
is supported by the requestor. The server may still use {{identity}} encoding 
(no encoding) unless the client forbids it with {{identity;q=0}}.

I think it's OK for libprocess to continue to apply body length threshold as 
long as it checks that {{identity}}'s weight is not 0.

> Libprocess endpoints can ignore required gzip compression
> ---------------------------------------------------------
>
>                 Key: MESOS-9451
>                 URL: https://issues.apache.org/jira/browse/MESOS-9451
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Benno Evers
>            Priority: Major
>              Labels: libprocess
>
> Currently, libprocess decides whether a response should be compressed by the 
> following conditional:
> {noformat}
>     if (response.type == http::Response::BODY &&
>         response.body.length() >= GZIP_MINIMUM_BODY_LENGTH &&
>         !headers.contains("Content-Encoding") &&
>         request.acceptsEncoding("gzip")) {
>       [...]
> {noformat}
> However, this implies that a request sent with the header "Accept-Encoding: 
> gzip" can not rely on actually getting a gzipped response, e.g. when the 
> response size is below the threshold:
> {noformat}
> $ nc localhost 5050
> GET /tasks HTTP/1.1
> Accept-Encoding: gzip
> HTTP/1.1 200 OK
> Date: Tue, 04 Dec 2018 12:49:56 GMT
> Content-Type: application/json
> Content-Length: 12
> {"tasks":[]}
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to