Fixed regex expression to make port and slash optional
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/1a825faa Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/1a825faa Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/1a825faa Branch: refs/heads/master Commit: 1a825faaf28688a7458776e68c4b2a473d07472f Parents: 0b418de Author: Imesh Gunaratne <[email protected]> Authored: Mon Apr 7 00:47:44 2014 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Mon Apr 7 00:47:44 2014 +0530 ---------------------------------------------------------------------- .../src/main/conf/synapse-configs/default/sequences/main.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/1a825faa/products/load-balancer/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml ---------------------------------------------------------------------- diff --git a/products/load-balancer/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml b/products/load-balancer/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml index 5e24684..1d6c4a6 100644 --- a/products/load-balancer/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml +++ b/products/load-balancer/modules/distribution/src/main/conf/synapse-configs/default/sequences/main.xml @@ -40,10 +40,10 @@ <!-- Updating location value in response header --> <filter regex=".+" source="$trp:Location"> - <property expression="$ctx:SERVICE_PREFIX" group="2" name="LB_SP_HOST_NAME" pattern="(^http.?:\/\/\b)(\d*.\d.\d.\d*.\d*)(?::(\d*))?(.*)"/> - <property expression="$trp:Location" group="1" name="EP_RESPONSE_LOC_PROTOCOL" pattern="(^http.?:\/\/\b)(\d*.\d.\d.\d*.\d*)(?::(\d*))?(.*)"/> - <property expression="$trp:Location" group="2" name="EP_RESPONSE_LOC_HOST_NAME" pattern="(^http.?:\/\/\b)(\d*.\d.\d.\d*.\d*)(?::(\d*))?(.*)"/> - <property expression="$trp:Location" group="4" name="EP_RESPONSE_LOC_PATH" pattern="(^http.?:\/\/\b)(\d*.\d.\d.\d*.\d*)(?::(\d*))?(.*)"/> + <property expression="$ctx:SERVICE_PREFIX" group="2" name="LB_SP_HOST_NAME" pattern="(^http.?://\b)(.*)(?:(\d*))(.*)"/> + <property expression="$trp:Location" group="1" name="EP_RESPONSE_LOC_PROTOCOL" pattern="(^http.?://\b)(.*)(?:(\d*))(.*)"/> + <property expression="$trp:Location" group="2" name="EP_RESPONSE_LOC_HOST_NAME" pattern="(^http.?://\b)(.*)(?:(\d*))(.*)"/> + <property expression="$trp:Location" group="4" name="EP_RESPONSE_LOC_PATH" pattern="(^http.?://\b)(.*)(?:(\d*))(.*)"/> <switch source="fn:lower-case($ctx:EP_RESPONSE_LOC_PROTOCOL)"> <case regex="https://">
