You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alexander Fisher (JIRA)" <ji...@apache.org> on 2010/02/09 13:50:27 UTC
[jira] Created: (WICKET-2732) Wicket redirects don't work with
Apache JMeter
Wicket redirects don't work with Apache JMeter
----------------------------------------------
Key: WICKET-2732
URL: https://issues.apache.org/jira/browse/WICKET-2732
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4.6
Environment: Glassfish
Reporter: Alexander Fisher
Unlike some browsers, JMeter does not fix up the broken URLs returned in the Location header of 302 redirects generated by wicket.
For instance, after signing out of a wicket 1.4.6 app, the redirect might be to Location: http://host/wicket-app/.
Some browsers and even some webservers will fix this up (removing the dot), but JMeter will not and glassfish (and possibly other appservers) will return a 404 error.
I've have discussed the issue with the JMeter developer and hence opened this ticket.
http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/201002.mbox/browser
Many thanks,
Alex
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2732) Wicket redirects don't work with
Apache JMeter
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831492#action_12831492 ]
Sebb commented on WICKET-2732:
------------------------------
Minor correction - JMeter works fine, it follows the redirect, but does not convert the location.
The location appears to be an absolute URL, so is not converted by the call to java.net.URL.URL(URL context, String spec) .
[JMeter calls this with the spec set to the Location: reference]
Indeed some OSes may permit "." as a file name, so this AFAICS is the correct behaviour by JMeter.
Wicket should ideally return a valid absolute URL, failing that it should return a valid relative URL.
The current behaviour appears to be neither.
> Wicket redirects don't work with Apache JMeter
> ----------------------------------------------
>
> Key: WICKET-2732
> URL: https://issues.apache.org/jira/browse/WICKET-2732
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.6
> Environment: Glassfish
> Reporter: Alexander Fisher
>
> Unlike some browsers, JMeter does not fix up the broken URLs returned in the Location header of 302 redirects generated by wicket.
> For instance, after signing out of a wicket 1.4.6 app, the redirect might be to Location: http://host/wicket-app/.
> Some browsers and even some webservers will fix this up (removing the dot), but JMeter will not and glassfish (and possibly other appservers) will return a 404 error.
> I've have discussed the issue with the JMeter developer and hence opened this ticket.
> http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/201002.mbox/browser
> Many thanks,
> Alex
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2732) Wicket redirects don't work with
Apache JMeter
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2732:
----------------------------------
Fix Version/s: 1.5-M1
> Wicket redirects don't work with Apache JMeter
> ----------------------------------------------
>
> Key: WICKET-2732
> URL: https://issues.apache.org/jira/browse/WICKET-2732
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.6
> Environment: Glassfish
> Reporter: Alexander Fisher
> Fix For: 1.5-M1
>
>
> Unlike some browsers, JMeter does not fix up the broken URLs returned in the Location header of 302 redirects generated by wicket.
> For instance, after signing out of a wicket 1.4.6 app, the redirect might be to Location: http://host/wicket-app/.
> Some browsers and even some webservers will fix this up (removing the dot), but JMeter will not and glassfish (and possibly other appservers) will return a 404 error.
> I've have discussed the issue with the JMeter developer and hence opened this ticket.
> http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/201002.mbox/browser
> Many thanks,
> Alex
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2732) Wicket redirects don't work with
Apache JMeter
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2732:
----------------------------------
Fix Version/s: 1.5-M2
(was: 1.5-M1)
> Wicket redirects don't work with Apache JMeter
> ----------------------------------------------
>
> Key: WICKET-2732
> URL: https://issues.apache.org/jira/browse/WICKET-2732
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.6
> Environment: Glassfish
> Reporter: Alexander Fisher
> Fix For: 1.5-M2
>
>
> Unlike some browsers, JMeter does not fix up the broken URLs returned in the Location header of 302 redirects generated by wicket.
> For instance, after signing out of a wicket 1.4.6 app, the redirect might be to Location: http://host/wicket-app/.
> Some browsers and even some webservers will fix this up (removing the dot), but JMeter will not and glassfish (and possibly other appservers) will return a 404 error.
> I've have discussed the issue with the JMeter developer and hence opened this ticket.
> http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/201002.mbox/browser
> Many thanks,
> Alex
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2732) Wicket redirects don't work with
Apache JMeter
Posted by "Kai Grabfelder (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876213#action_12876213 ]
Kai Grabfelder commented on WICKET-2732:
----------------------------------------
We are having a slightly related problem here with a wicket application that uses org.apache.wicket.request.target.coding.HybridUrlCodingStrategy.
If the application is deployed on tomcat (looks like we don't have the problem on jetty) is answering a request like this
{code}
GET http://localhost/myappctx/document/create
{code}
with a response like that
{code}
Response headers:
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://localhost/myappctx/document/../document/create.1
{code}
jmeter can't handle that. In order to workaround this behaviour I added the following servlet filter to my application.
{code}
/**
* Servlet filter that converts wicket relative 302 redirects to absolute urls
* (otherwhise jmeter can't load test a wicket app that is deployed on tomcat because it can't handle responses like
*
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://localhost/myappctx/document/../document/create.1
*
*
* @author Kai Grabfelder
*
*@see https://issues.apache.org/jira/browse/WICKET-2732
*/
public class RelativeUrlFilter implements Filter {
@Override
public void destroy() {
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest servletRequest = (HttpServletRequest) request;
HttpServletResponse servletResponse = (HttpServletResponse) response;
chain.doFilter(request, new RelativeUrlServletResponseFilter(servletRequest, servletResponse));
}
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
public class RelativeUrlServletResponseFilter extends HttpServletResponseWrapper {
private URI baseURL;
public RelativeUrlServletResponseFilter(HttpServletRequest servletRequest, HttpServletResponse servletResponse) {
super(servletResponse);
try {
baseURL = new URI(servletRequest.getRequestURI());
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
}
@Override
public void sendRedirect(String location) throws IOException {
URI newURL = baseURL.resolve(location);
super.sendRedirect(newURL.toString());
}
}
}
{code}
Please note that I haven't tested it extensivly yet (e.g. if it works if wicket is performing an absolute redirect). I'm even not sure if the tomcat behaviour (not converting the relative url to an absolute URL) is correct. Btw. the following thread is discussing the tomcat behaviour on the tomcat mailing list http://old.nabble.com/URLs-with-%27..-%27-and-404s-td28180099.html
> Wicket redirects don't work with Apache JMeter
> ----------------------------------------------
>
> Key: WICKET-2732
> URL: https://issues.apache.org/jira/browse/WICKET-2732
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.6
> Environment: Glassfish
> Reporter: Alexander Fisher
> Fix For: 1.5-M1
>
>
> Unlike some browsers, JMeter does not fix up the broken URLs returned in the Location header of 302 redirects generated by wicket.
> For instance, after signing out of a wicket 1.4.6 app, the redirect might be to Location: http://host/wicket-app/.
> Some browsers and even some webservers will fix this up (removing the dot), but JMeter will not and glassfish (and possibly other appservers) will return a 404 error.
> I've have discussed the issue with the JMeter developer and hence opened this ticket.
> http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/201002.mbox/browser
> Many thanks,
> Alex
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-2732) Wicket redirects don't work with
Apache JMeter
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-2732.
-----------------------------------
Assignee: Igor Vaynberg
Fix Version/s: 1.5-M1
(was: 1.5-M2)
Resolution: Fixed
this should already be fixed in 1.5
> Wicket redirects don't work with Apache JMeter
> ----------------------------------------------
>
> Key: WICKET-2732
> URL: https://issues.apache.org/jira/browse/WICKET-2732
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.6
> Environment: Glassfish
> Reporter: Alexander Fisher
> Assignee: Igor Vaynberg
> Fix For: 1.5-M1
>
>
> Unlike some browsers, JMeter does not fix up the broken URLs returned in the Location header of 302 redirects generated by wicket.
> For instance, after signing out of a wicket 1.4.6 app, the redirect might be to Location: http://host/wicket-app/.
> Some browsers and even some webservers will fix this up (removing the dot), but JMeter will not and glassfish (and possibly other appservers) will return a 404 error.
> I've have discussed the issue with the JMeter developer and hence opened this ticket.
> http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/201002.mbox/browser
> Many thanks,
> Alex
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.