prabhuish / webutilities

Automatically exported from code.google.com/p/webutilities
0 stars 0 forks source link

Utils.findResourcesToMerge may fail if contextPath occurs elsewhere within the requestURI #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Call the method for a URI such as "/mycontext/path/to/mycontext.js" and it will 
replace "mycontext" more than once because of line 233:
   requestURI = requestURI.replace(contextPath, "");

The result is that the requested resource will obviously not be found

Maybe you could just use "replaceFirst" instead of "replace"?

I am using version 0.5, but the code is the same for version 0.6

Original issue reported on code.google.com by mjonatha...@gmail.com on 3 Feb 2014 at 5:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by rr.patil...@gmail.com on 30 Mar 2014 at 3:50

GoogleCodeExporter commented 9 years ago
Duplicate of issue 31 and already fixed by 
https://github.com/rpatil26/webutilities/commit/7136e7ba1bfcd05939994bb582e1d0df
dfe7f3b0

Original comment by rr.patil...@gmail.com on 29 Apr 2014 at 5:55