You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/06/11 03:19:48 UTC
[incubator-servicecomb-java-chassis] 01/04:
[SCB-653]Transfer-Encoding and Content-Length can not be set to response
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git
commit 5c401de453d8d939b38d984f2004e603406c9647
Author: liubao <ba...@huawei.com>
AuthorDate: Thu Jun 7 19:36:03 2018 +0800
[SCB-653]Transfer-Encoding and Content-Length can not be set to response
---
.../org/apache/servicecomb/common/rest/AbstractRestInvocation.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
index 9a3769b..81e6fc9 100644
--- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
+++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
@@ -205,7 +205,8 @@ public abstract class AbstractRestInvocation {
if (response.getHeaders().getHeaderMap() != null) {
for (Entry<String, List<Object>> entry : response.getHeaders().getHeaderMap().entrySet()) {
for (Object value : entry.getValue()) {
- if (!entry.getKey().equalsIgnoreCase(HttpHeaders.CONTENT_LENGTH)) {
+ if (!entry.getKey().equalsIgnoreCase(HttpHeaders.CONTENT_LENGTH)
+ && !entry.getKey().equalsIgnoreCase("Transfer-Encoding")) {
responseEx.addHeader(entry.getKey(), String.valueOf(value));
}
}
--
To stop receiving notification emails like this one, please contact
liubao@apache.org.