You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jeremy Thomerson (JIRA)" <ji...@apache.org> on 2007/06/04 01:38:15 UTC
[jira] Created: (WICKET-612) HeaderContributor forces relative URL
HeaderContributor forces relative URL
-------------------------------------
Key: WICKET-612
URL: https://issues.apache.org/jira/browse/WICKET-612
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.3.0-beta1
Reporter: Jeremy Thomerson
Priority: Minor
Fix For: 1.3.0-beta2
I consider this a bug, and was wondering if you do as well... If so, I will open a JIRA and attach a patch for it. Just let me know.
In my 1.2.6 app, I have the following line:
add(HeaderContributor.forCss("/resources/styles/global.css"));
which generates this in the markup (correctly):
<link rel ="stylesheet" type="text/css" href="/resources/css/global.css" ></link>
In 1.3, it generates this in the markup (incorrectly):
<link rel ="stylesheet" type="text/css" href="../../..//resources/styles/global.css" ></link>
This is because of the change to have everything with relative URLs, I am assuming. But, I don't want a relative URL, I want an absolute one. I'm thinking that the following change would be appropriate:
HeaderContributor.java (26)
if (location.startsWith("http://") || location.startsWith("https://"))
changed to:
if (location.startsWith("http://") || location.startsWith("https://") || location.startsWith("/"))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-612) HeaderContributor forces relative URL
Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alastair Maw resolved WICKET-612.
---------------------------------
Resolution: Fixed
Yep, I think this is a reasonable use-case, even if it might confuse some users. I've updated the javadoc appropriately, so hopefully this will be mitigated.
Fixed in r544124.
> HeaderContributor forces relative URL
> -------------------------------------
>
> Key: WICKET-612
> URL: https://issues.apache.org/jira/browse/WICKET-612
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta1
> Reporter: Jeremy Thomerson
> Assignee: Alastair Maw
> Priority: Minor
> Fix For: 1.3.0-beta2
>
> Attachments: wicket-patch-612.patch
>
>
> I consider this a bug, and was wondering if you do as well... If so, I will open a JIRA and attach a patch for it. Just let me know.
> In my 1.2.6 app, I have the following line:
> add(HeaderContributor.forCss("/resources/styles/global.css"));
> which generates this in the markup (correctly):
> <link rel ="stylesheet" type="text/css" href="/resources/css/global.css" ></link>
> In 1.3, it generates this in the markup (incorrectly):
> <link rel ="stylesheet" type="text/css" href="../../..//resources/styles/global.css" ></link>
> This is because of the change to have everything with relative URLs, I am assuming. But, I don't want a relative URL, I want an absolute one. I'm thinking that the following change would be appropriate:
> HeaderContributor.java (26)
> if (location.startsWith("http://") || location.startsWith("https://"))
> changed to:
> if (location.startsWith("http://") || location.startsWith("https://") || location.startsWith("/"))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WICKET-612) HeaderContributor forces relative URL
Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alastair Maw reassigned WICKET-612:
-----------------------------------
Assignee: Alastair Maw
> HeaderContributor forces relative URL
> -------------------------------------
>
> Key: WICKET-612
> URL: https://issues.apache.org/jira/browse/WICKET-612
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta1
> Reporter: Jeremy Thomerson
> Assignee: Alastair Maw
> Priority: Minor
> Fix For: 1.3.0-beta2
>
> Attachments: wicket-patch-612.patch
>
>
> I consider this a bug, and was wondering if you do as well... If so, I will open a JIRA and attach a patch for it. Just let me know.
> In my 1.2.6 app, I have the following line:
> add(HeaderContributor.forCss("/resources/styles/global.css"));
> which generates this in the markup (correctly):
> <link rel ="stylesheet" type="text/css" href="/resources/css/global.css" ></link>
> In 1.3, it generates this in the markup (incorrectly):
> <link rel ="stylesheet" type="text/css" href="../../..//resources/styles/global.css" ></link>
> This is because of the change to have everything with relative URLs, I am assuming. But, I don't want a relative URL, I want an absolute one. I'm thinking that the following change would be appropriate:
> HeaderContributor.java (26)
> if (location.startsWith("http://") || location.startsWith("https://"))
> changed to:
> if (location.startsWith("http://") || location.startsWith("https://") || location.startsWith("/"))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-612) HeaderContributor forces relative
URL
Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501061 ]
Jeremy Thomerson commented on WICKET-612:
-----------------------------------------
Additional clarification:
If I put "/foo/bar.css" - foo is NOT my context. My context for the app could be anything (but not foo). Foo would be the root folder off of my domain that I want the request to be sent for. (i.e.. www.mydomain.com/app/SomeWicketPage includes the style sheet at www.mydomain.com/foo/bar.css). I do this and pair it with an Apache alias that directs "/foo" to that folder within my webapp so that Apache (not my servlet container) will serve static resources.
As of 1.2.6, it works fine. As of 1.3, I can no longer do that without adding my domain name ( add(HeaderContributor.forCss("http://www.mydomain.com/resources/styles/global.css")); ), which is NOT desirable - I should not have to add my domain name to be able to add the resource relative to my domain root.
> HeaderContributor forces relative URL
> -------------------------------------
>
> Key: WICKET-612
> URL: https://issues.apache.org/jira/browse/WICKET-612
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta1
> Reporter: Jeremy Thomerson
> Priority: Minor
> Fix For: 1.3.0-beta2
>
>
> I consider this a bug, and was wondering if you do as well... If so, I will open a JIRA and attach a patch for it. Just let me know.
> In my 1.2.6 app, I have the following line:
> add(HeaderContributor.forCss("/resources/styles/global.css"));
> which generates this in the markup (correctly):
> <link rel ="stylesheet" type="text/css" href="/resources/css/global.css" ></link>
> In 1.3, it generates this in the markup (incorrectly):
> <link rel ="stylesheet" type="text/css" href="../../..//resources/styles/global.css" ></link>
> This is because of the change to have everything with relative URLs, I am assuming. But, I don't want a relative URL, I want an absolute one. I'm thinking that the following change would be appropriate:
> HeaderContributor.java (26)
> if (location.startsWith("http://") || location.startsWith("https://"))
> changed to:
> if (location.startsWith("http://") || location.startsWith("https://") || location.startsWith("/"))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-612) HeaderContributor forces relative URL
Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Thomerson updated WICKET-612:
------------------------------------
Attachment: wicket-patch-612.patch
This patch will fix the problem described (within HeaderContributor), although there may be other locations with similar problems.
Hopefully the patch is generated correctly. I had some problems getting Eclipse to generate a proper patch that could be applied to a clean workspace.
> HeaderContributor forces relative URL
> -------------------------------------
>
> Key: WICKET-612
> URL: https://issues.apache.org/jira/browse/WICKET-612
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta1
> Reporter: Jeremy Thomerson
> Priority: Minor
> Fix For: 1.3.0-beta2
>
> Attachments: wicket-patch-612.patch
>
>
> I consider this a bug, and was wondering if you do as well... If so, I will open a JIRA and attach a patch for it. Just let me know.
> In my 1.2.6 app, I have the following line:
> add(HeaderContributor.forCss("/resources/styles/global.css"));
> which generates this in the markup (correctly):
> <link rel ="stylesheet" type="text/css" href="/resources/css/global.css" ></link>
> In 1.3, it generates this in the markup (incorrectly):
> <link rel ="stylesheet" type="text/css" href="../../..//resources/styles/global.css" ></link>
> This is because of the change to have everything with relative URLs, I am assuming. But, I don't want a relative URL, I want an absolute one. I'm thinking that the following change would be appropriate:
> HeaderContributor.java (26)
> if (location.startsWith("http://") || location.startsWith("https://"))
> changed to:
> if (location.startsWith("http://") || location.startsWith("https://") || location.startsWith("/"))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-612) HeaderContributor forces relative
URL
Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501241 ]
Eelco Hillenius commented on WICKET-612:
----------------------------------------
See http://www.nabble.com/Bug-in-1.3--HeaderContributor.forCss%28String%29-tf3836995.html for the discussion thread.
> HeaderContributor forces relative URL
> -------------------------------------
>
> Key: WICKET-612
> URL: https://issues.apache.org/jira/browse/WICKET-612
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta1
> Reporter: Jeremy Thomerson
> Assignee: Alastair Maw
> Priority: Minor
> Fix For: 1.3.0-beta2
>
> Attachments: wicket-patch-612.patch
>
>
> I consider this a bug, and was wondering if you do as well... If so, I will open a JIRA and attach a patch for it. Just let me know.
> In my 1.2.6 app, I have the following line:
> add(HeaderContributor.forCss("/resources/styles/global.css"));
> which generates this in the markup (correctly):
> <link rel ="stylesheet" type="text/css" href="/resources/css/global.css" ></link>
> In 1.3, it generates this in the markup (incorrectly):
> <link rel ="stylesheet" type="text/css" href="../../..//resources/styles/global.css" ></link>
> This is because of the change to have everything with relative URLs, I am assuming. But, I don't want a relative URL, I want an absolute one. I'm thinking that the following change would be appropriate:
> HeaderContributor.java (26)
> if (location.startsWith("http://") || location.startsWith("https://"))
> changed to:
> if (location.startsWith("http://") || location.startsWith("https://") || location.startsWith("/"))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.