grails-plugins/grails-resources — pull request #45 by pjungermann (2013-04-01 13:02:19+00:00)
Title: GPRESOURCES-170 - interpret "server-relative" URLs in CSS files as context-relative URLs

As stated in [GPRESOURCES-170](http://jira.grails.org/browse/GPRESOURCES-170), there are two possibile interpretations of URLs starting with a slash. It might be a server-relative URL containing the context path (if there is any), or it might be a context-relative URL, which doesn't contain the context.

For the 1st case, those URLs might get broken, if the application uses a different configuration value for the context or was deployed under a different context (i.e. via a different WAR file name).

For the 2nd case, URLs would be broken, if the application is not deployed at the root context.

Because of these reasons, such references shouldn't be used.

For the case that they have been used, this patch will now interpret such references as context-relative and will therefore mark and process them.

All unit tests related to it have been adjusted and some additional ones for the URLUtils have been provided as well.