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/01/17 22:01:49 UTC

[GitHub] dgrove-oss commented on a change in pull request #3125: Allow / in "host" portion of actionUrlPattern

dgrove-oss commented on a change in pull request #3125: Allow / in "host" portion of actionUrlPattern
URL: https://github.com/apache/incubator-openwhisk/pull/3125#discussion_r162192397
 
 

 ##########
 File path: core/routemgmt/common/apigw-utils.js
 ##########
 @@ -577,15 +577,15 @@ 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
  *           result[6] : action response type (i.e http, json, text, html, or svg)
  */
 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+)/;
 
 Review comment:
   it seems to work without escaping the / (because it is inside a [] ??), but  I can test with the / being escaped.   I'm not an expert of the grammar for JS regex...

----------------------------------------------------------------
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