SOS
SOS copied to clipboard
Non-streaming ResponseWriters can't choose to not support gZip
This is probably low priority, but it doesn't seem like non-streaming ResponseWriters
can choose to not support gZip encoding. This is because all responses are funneled through AbstractServiceResponseWriter
(to enable streaming), which has this for its supportsGZip
implementation:
@Override
public boolean supportsGZip(AbstractServiceResponse asr) {
if (isStreaming(asr)) {
return false;
}
return true;
}
In non-streaming cases, the supportsGZip
method of the underlying ResponseWriter
is never consulted (and the underlying ResponseWriter
is only available during the write
method).
Not sure how to solve this or even how important it is, but wanted to bring it up for discussion.