[ 
https://issues.apache.org/jira/browse/WICKET-1739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617745#action_12617745
 ] 

Martin Grigorov commented on WICKET-1739:
-----------------------------------------

Hi Igor,

Here is the problem:

MockHttpServletRequest.java, line 1121, setURL(String):
this.url = url;

The check for '?' is at line 1131 and only 'path' instance variable is fixed 
('url' still contains the query string).
Later when the stack trace from the description happens 
MockHttpServletRequest.getRequestURI() is called and 'url' is being used (not 
'path').

Let me know if you need more information.

Thanks for your help! 

> Request.getPath() doesn't honor its contract for MockHttpServletRequest
> -----------------------------------------------------------------------
>
>                 Key: WICKET-1739
>                 URL: https://issues.apache.org/jira/browse/WICKET-1739
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.4
>         Environment: Linux, Jetty 6.1.x
>            Reporter: Martin Grigorov
>
> With SVN r655308 MockWebApplication.processRequestCycle(Class, 
> PageParameters) has been refactored and now each call to this method with 
> non-home page's class as parameter calls "getServletRequest().setURL(path + 
> url);" at line 452 (wicket 1.3.4). After this invocation all subsequent calls 
> with this stack trace :
> Thread [main] (Suspended)     
>       MockHttpServletRequest.getRequestURI() line: 793        
>       MockWebApplication$1(WicketFilter).getRelativePath(HttpServletRequest) 
> line: 452        
>       ServletWebRequest.getPath() line: 144   
>       WebRequestCodingStrategy.getRequestPath(Request) line: 988      
>       WebRequestCodingStrategy.decode(Request) line: 196      
>       ServletWebRequest(Request).getRequestParameters() line: 171     
>       MyPage(Page).init() line: 1167  
>        ... 
> returns not just the path but the query string is appended too (e.g. 
> /mount/path?someParam=value) and later on 
> o.a.w.request/target/coding/AbstractRequestTargetUrlCodingStrategy#matches(String)
>  returns false (because there is query string at the end) and thus it could 
> not resolve the request target.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to