Hi,

I've just checked upcoming 6.7 release and have found a regression (6.6.0
works fine).

The problem appears when I'm trying to use UrlResourceReference with a url
that starts with slash.

Here is the code (assume the case when context path is empty)

@Override
    public void renderHead(IHeaderResponse response) {
        super.renderHead(response);

        UrlResourceReference reference = new
UrlResourceReference(Url.parse(path("style.css")));
        response.render(CssHeaderItem.forReference(reference));
    }

    private static String path(String relativePath) {
        return String.format("%s/%s", getBaseUrl(), relativePath);
    }

    private static String getBaseUrl() {
        return RequestCycle.get().getRequest().getContextPath();
    }

Looks like it was introduced after fixing WICKET-5065

Removing the slash fixes the problem.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Regresion-in-6-7-0-SNAPSHOT-tp4657901.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to