asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: ASTERIXDB-1939: No chunked encoding with content-length.
Date Sun, 11 Jun 2017 06:04:25 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master e5c4528d0 -> f0759c85b


ASTERIXDB-1939: No chunked encoding with content-length.

Change-Id: I06d561eb023f1c84c531e9b2cfe88a626d7e5280
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1632
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/f0759c85
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/f0759c85
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/f0759c85

Branch: refs/heads/master
Commit: f0759c85b70d18fe9376cdc034ed9e70e1ec0c74
Parents: e5c4528
Author: Till Westmann <tillw@apache.org>
Authored: Sat Jun 10 20:35:10 2017 -0700
Committer: Till Westmann <tillw@apache.org>
Committed: Sat Jun 10 23:03:59 2017 -0700

----------------------------------------------------------------------
 .../hyracks/control/cc/web/ApplicationInstallationHandler.java     | 1 +
 .../main/java/org/apache/hyracks/http/server/ChunkedResponse.java  | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f0759c85/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java
index 9745091..2b0382b 100755
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/web/ApplicationInstallationHandler.java
@@ -71,6 +71,7 @@ public class ApplicationInstallationHandler extends AbstractServlet {
                 : rootDir + File.separator + "/applications/" + File.separator + deployIdString;
         final HttpMethod method = request.getHttpRequest().method();
         try {
+            response.setStatus(HttpResponseStatus.OK);
             if (method == HttpMethod.PUT) {
                 final ByteBuf content = request.getHttpRequest().content();
                 writeToFile(content, deploymentDir, fileName);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f0759c85/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
index 1d219ba..8fd444b 100644
--- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
+++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/ChunkedResponse.java
@@ -164,6 +164,8 @@ public class ChunkedResponse implements IServletResponse {
     private void fullResponse(HttpVersion version, HttpResponseStatus status, ByteBuf buffer,
HttpHeaders headers) {
         DefaultFullHttpResponse fullResponse = new DefaultFullHttpResponse(version, status,
buffer);
         fullResponse.headers().set(headers);
+        // for a full response remove chunked transfer-encoding and set the content length
instead
+        fullResponse.headers().remove(HttpHeaderNames.TRANSFER_ENCODING);
         fullResponse.headers().setInt(HttpHeaderNames.CONTENT_LENGTH, buffer.readableBytes());
         future = ctx.writeAndFlush(fullResponse);
         headerSent = true;


Mime
View raw message