asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Set response status for web interface servlets
Date Fri, 24 Feb 2017 06:49:00 GMT
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1528

Change subject: Set response status for web interface servlets
......................................................................

Set response status for web interface servlets

Change-Id: Id4b5e153a8c589b666a44ae17bb05c69cfc3c9d9
---
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/28/1528/1

diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
index 234d134..7a33c0e 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ApiServlet.java
@@ -113,6 +113,7 @@
         String printJob = request.getParameter("print-job");
         String executeQuery = request.getParameter("execute-query");
         try {
+            response.setStatus(HttpResponseStatus.OK);
             HttpUtil.setContentType(response, ContentType.TEXT_HTML, Encoding.UTF8);
         } catch (IOException e) {
             LOGGER.log(Level.WARNING, "Failure setting content type", e);
@@ -162,7 +163,7 @@
     protected void get(IServletRequest request, IServletResponse response) {
         String resourcePath = null;
         String requestURI = request.getHttpRequest().uri();
-
+        response.setStatus(HttpResponseStatus.OK);
         if ("/".equals(requestURI)) {
             try {
                 HttpUtil.setContentType(response, HttpUtil.ContentType.TEXT_HTML, HttpUtil.Encoding.UTF8);
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
index 94ce017..0afa7d6 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryWebInterfaceServlet.java
@@ -46,6 +46,7 @@
     @Override
     protected void get(IServletRequest request, IServletResponse response) throws IOException
{
         String requestURI = request.getHttpRequest().uri();
+        response.setStatus(HttpResponseStatus.OK);
         if ("/".equals(requestURI)) {
             HttpUtil.setContentType(response, HttpUtil.ContentType.TEXT_HTML);
             deliverResource("/queryui/queryui.html", response);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1528
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4b5e153a8c589b666a44ae17bb05c69cfc3c9d9
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message