From 9d49c8a12539224f922b6350225e351d3ecc4197 Mon Sep 17 00:00:00 2001 From: Rathna Natarajan Date: Wed, 3 Jul 2019 09:45:11 -0700 Subject: [PATCH] Fix to handle query string --- param.json | 2 +- .../PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.md5 | 2 +- .../PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.xml | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/param.json b/param.json index 94934ee..452a646 100644 --- a/param.json +++ b/param.json @@ -1,5 +1,5 @@ { "apiname": "pcftest", "type":"swagger", - "uri": "http://greeting-app-interested-fossa.apps.sanpablo.cf-app.com/api/v3/swagger.json" + "uri": "http://greeting-app-talkative-squirrel.apps.tokyo.cf-app.com/api/v3/swagger.json" } \ No newline at end of file diff --git a/src/main/resources/apiproject/PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.md5 b/src/main/resources/apiproject/PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.md5 index 4b7097e..3b39928 100644 --- a/src/main/resources/apiproject/PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.md5 +++ b/src/main/resources/apiproject/PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.md5 @@ -1 +1 @@ -034f4708296332260654ba2407d10019 \ No newline at end of file +5c00d816d985ea7c7edd5fccdcc5ea26 \ No newline at end of file diff --git a/src/main/resources/apiproject/PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.xml b/src/main/resources/apiproject/PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.xml index a40bf24..f34c986 100644 --- a/src/main/resources/apiproject/PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.xml +++ b/src/main/resources/apiproject/PrimaryStore-e80e7788-1aec-4d7b-a83c-d2975f1151e3.xml @@ -7704,6 +7704,10 @@ .jar application/x-java-archive + + + */* + .pdf application/pdf @@ -13270,7 +13274,7 @@ Passed script filter Get Path from X-Cf-Forwarded-Url - import java.net.URI; def invoke(msg) { def url = msg.get("url"); def URI = new URI(url); def path = URI.getRawPath(); msg.put("path",path); def httpHeaders = msg.get("http.headers"); def port = URI.getPort(); if ( port == -1) { httpHeaders.setHeader("Host", URI.getHost()); } else{ httpHeaders.setHeader("Host", URI.getHost() + ":" + port); } return true; } + import java.net.URI; def invoke(msg) { def url = msg.get("url"); def URI = new URI(url); def path = URI.getRawPath(); def queryString = URI.getRawQuery(); path = path + (queryString == null ? "" : '?' + queryString); msg.put("path",path); def httpHeaders = msg.get("http.headers"); def port = URI.getPort(); if ( port == -1) { httpHeaders.setHeader("Host", URI.getHost()); } else{ httpHeaders.setHeader("Host", URI.getHost() + ":" + port); } return true; } 2331372335669071159