Closed GoogleCodeExporter closed 8 years ago
Attached wrong file. Try this one.
Original comment by n...@esped.com
on 29 Jun 2012 at 7:08
Attachments:
Original comment by rr.patil...@gmail.com
on 30 Jun 2012 at 4:25
I've solved this problem.
I modified the method processCSSLine of JSCSSMergeServlet class. The new method:
private String processCSSLine(ServletContext context, String contextPath,
String cssFilePath, StringBuffer line) {
Matcher matcher = CSS_IMG_URL_PATTERN.matcher(line);
String cssRealPath = context.getRealPath(cssFilePath);
while (matcher.find()) {
String refImgPath = matcher.group(1);
if (!isProtocolURL(refImgPath)) { //ignore absolute protocol paths
String resolvedImgPath = refImgPath;
if (!refImgPath.startsWith("/")) {
resolvedImgPath = buildProperPath(getParentPath(cssFilePath), refImgPath);
}
String imgRealPath = context.getRealPath(resolvedImgPath);
int offset = line.indexOf(refImgPath);
line.replace(
offset, //from
offset + refImgPath.length(), //to
contextPath + (this.turnOfUrlFingerPrinting ? resolvedImgPath : addFingerPrint(buildETagForResource(resolvedImgPath, context), resolvedImgPath))
);
updateReferenceMap(cssRealPath, imgRealPath);
matcher.reset(line.subSequence(offset + refImgPath.length(), line.length()));
}
}
return line.toString();
}
Original comment by jluvi...@gmail.com
on 29 Aug 2012 at 6:00
Thank you!
Original comment by n...@esped.com
on 29 Aug 2012 at 8:32
@ jluvizon - Is it possible for you to create a pull request on github?
https://github.com/rpatil26/webutilities
Original comment by rr.patil...@gmail.com
on 30 Aug 2012 at 4:44
Original comment by rr.patil...@gmail.com
on 18 Oct 2012 at 2:18
https://github.com/rpatil26/webutilities/commit/95c02b6f30205c32551158bcc68a5962
47bf1c2e
Original comment by rr.patil...@gmail.com
on 22 Feb 2013 at 9:07
Original issue reported on code.google.com by
n...@esped.com
on 29 Jun 2012 at 7:05