You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/02/11 17:40:41 UTC

[GitHub] csantanapr closed pull request #3125: Allow / in "host" portion of actionUrlPattern

csantanapr closed pull request #3125: Allow / in "host" portion of actionUrlPattern
URL: https://github.com/apache/incubator-openwhisk/pull/3125
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/routemgmt/common/apigw-utils.js b/core/routemgmt/common/apigw-utils.js
index c78f4c80b9..f3d3c96fa9 100644
--- a/core/routemgmt/common/apigw-utils.js
+++ b/core/routemgmt/common/apigw-utils.js
@@ -577,7 +577,7 @@ function generateCliApiFromGwApi(gwApi) {
  *  result - an array of strings.
  *           result[0] : Entire URL
  *           result[1] : protocol (i.e. https)
- *           result[2] : host (i.e. myco.com, 1.2.3.4)
+ *           result[2] : host (i.e. myco.com, 1.2.3.4, myco.com/mywhisk)
  *           result[3] : namespace
  *           result[4] : package name
  *           result[5] : action name
@@ -585,7 +585,7 @@ function generateCliApiFromGwApi(gwApi) {
  */
 function parseActionUrl(actionUrl) {
   console.log('parseActionUrl: parsing action url: '+actionUrl);
-  var actionUrlPattern = /(\w+):\/\/([:\w.\-]+)\/api\/v\d\/web\/([@\w .\-]+)\/([@\w .\-]+)\/([@\w .\-\/]+)\.(\w+)/;
+  var actionUrlPattern = /(\w+):\/\/([:\/\w.\-]+)\/api\/v\d\/web\/([@\w .\-]+)\/([@\w .\-]+)\/([@\w .\-\/]+)\.(\w+)/;
   try {
     return actionUrl.match(actionUrlPattern);
   } catch(e) {
diff --git a/core/routemgmt/common/utils.js b/core/routemgmt/common/utils.js
index 6e3c3a77e4..a9672b9ac6 100644
--- a/core/routemgmt/common/utils.js
+++ b/core/routemgmt/common/utils.js
@@ -687,12 +687,12 @@ function generateCliApiFromGwApi(gwApi) {
  *  result - an array of strings.
  *           result[0] : Entire URL
  *           result[1] : protocol (i.e. https)
- *           result[2] : host (i.e. myco.com, 1.2.3.4)
+ *           result[2] : host (i.e. myco.com, 1.2.3.4, myco.com/whisk)
  *           result[3] : namespace
  *           result[4] : action name, including the package if used (i.e. myaction, mypkg/myaction)
  */
 function parseActionUrl(actionUrl) {
-  var actionUrlPattern = /(\w+):\/\/([:\w.\-]+)\/api\/v\d\/namespaces\/([@\w .\-]+)\/actions\/([@\w .\-\/]+)/;
+  var actionUrlPattern = /(\w+):\/\/([:\/\w.\-]+)\/api\/v\d\/namespaces\/([@\w .\-]+)\/actions\/([@\w .\-\/]+)/;
   try {
     return actionUrl.match(actionUrlPattern);
   } catch(e) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services