knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [knox] branch master updated: KNOX-1998 - WebHDFS rewrite.xml does not have rewrite rule for Location field in json (#138)
Date Mon, 16 Sep 2019 14:17:17 GMT
This is an automated email from the ASF dual-hosted git repository.

more pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b1d79f  KNOX-1998 - WebHDFS rewrite.xml does not have rewrite rule for Location
field in json (#138)
8b1d79f is described below

commit 8b1d79f930317b5f076d6dda4567d483d2948270
Author: Lokesh Jain <lokeshj1703@gmail.com>
AuthorDate: Mon Sep 16 19:47:12 2019 +0530

    KNOX-1998 - WebHDFS rewrite.xml does not have rewrite rule for Location field in json
(#138)
---
 .../src/main/resources/services/webhdfs/2.4.0/rewrite.xml              | 3 +++
 .../src/main/resources/services/webhdfs/2.4.0/service.xml              | 1 +
 2 files changed, 4 insertions(+)

diff --git a/gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/rewrite.xml
index 8fb0d1c..152deb3 100644
--- a/gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/rewrite.xml
+++ b/gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/rewrite.xml
@@ -65,6 +65,9 @@
         <content type="application/x-http-headers">
             <apply path="Location" rule="WEBHDFS/webhdfs/outbound/namenode/headers/location"/>
         </content>
+        <content type="application/json">
+            <apply path="$.Location" rule="WEBHDFS/webhdfs/outbound/namenode/headers/location"/>
+        </content>
     </filter>
 
 </rules>
\ No newline at end of file
diff --git a/gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/service.xml
b/gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/service.xml
index 7c23627..8da7bd0 100644
--- a/gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/service.xml
+++ b/gateway-service-definitions/src/main/resources/services/webhdfs/2.4.0/service.xml
@@ -23,6 +23,7 @@
         <route path="/webhdfs/v1/**?**">
             <rewrite apply="WEBHDFS/webhdfs/inbound/namenode/file" to="request.url"/>
             <rewrite apply="WEBHDFS/webhdfs/outbound/namenode/headers" to="response.headers"/>
+            <rewrite apply="WEBHDFS/webhdfs/outbound/namenode/headers" to="response.body"/>
         </route>
         <route path="/webhdfs/v1/~?**">
             <rewrite apply="WEBHDFS/webhdfs/inbound/namenode/home" to="request.url"/>


Mime
View raw message