You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by km...@apache.org on 2013/07/01 22:37:27 UTC
git commit: KNOX-79: post parameters are lost while request flows
from knox to secure cluster Fixed buffering in cases where content length is
changed due to entity rewriting.
Updated Branches:
refs/heads/master 795bf86c5 -> 234ecc641
KNOX-79: post parameters are lost while request flows from knox to secure cluster
Fixed buffering in cases where content length is changed due to entity rewriting.
Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/234ecc64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/234ecc64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/234ecc64
Branch: refs/heads/master
Commit: 234ecc641a8a21e8e387cf0e8bebd77325c6516b
Parents: 795bf86
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Mon Jul 1 16:37:23 2013 -0400
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Mon Jul 1 16:37:23 2013 -0400
----------------------------------------------------------------------
.../org/apache/hadoop/gateway/dispatch/HttpClientDispatch.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/234ecc64/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/HttpClientDispatch.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/HttpClientDispatch.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/HttpClientDispatch.java
index aabf9e0..00b00e2 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/HttpClientDispatch.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/dispatch/HttpClientDispatch.java
@@ -127,7 +127,7 @@ public class HttpClientDispatch extends AbstractGatewayDispatch {
String contentType = request.getContentType();
String contentEncoding = request.getCharacterEncoding();
HttpEntity entity = null;
- if ((contentLength > 0) && (contentType != null)
+ if ((contentType != null)
&& (contentType.startsWith(CT_APP_WWW_FORM_URL_ENCODED) ||
contentType.equalsIgnoreCase(CT_APP_XML))) {
if (contentLength <= REPLAY_BUFFER_MAX_SIZE) {
@@ -146,7 +146,7 @@ public class HttpClientDispatch extends AbstractGatewayDispatch {
}
} else {
InputStreamEntity streamEntity = new RepeatableInputStreamEntity(
- contentStream, contentLength); // DILLI
+ contentStream, contentLength);
if (contentType != null) {
streamEntity.setContentType(contentType);
}