YaoHaishi created SCB-1288:
------------------------------
Summary: Responses are sent before all of the HttpServerFilters
are executed in file downloading situation
Key: SCB-1288
URL: https://issues.apache.org/jira/browse/SCB-1288
Project: Apache ServiceComb
Issue Type: Bug
Reporter: YaoHaishi
Assignee: YaoHaishi
See Github issue
[https://github.com/apache/servicecomb-java-chassis/issues/1201]
In the file downloading situation, the body of responses are sent in method
org.apache.servicecomb.common.rest.filter.inner.ServerRestArgsFilter#beforeSendResponseAsync
{code:java}
Object body = response.getResult();
if (response.isFailed()) {
body = ((InvocationException) body).getErrorData();
}
if (Part.class.isInstance(body)) {
// here the body is sent
return responseEx.sendPart((Part) body);
}
{code}
If there are HttpServerFilters executed after ServerRestArgsFilter, it's too
late for them to modify the response because the response has already been sent.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)