[jira] Commented: (MYFACES-1547) ServletExternalContextImpl.redirect did not encode URL, so URL-rewriting fail

2007-02-28 Thread JIRA

[ 
https://issues.apache.org/jira/browse/MYFACES-1547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476583
 ] 

Matthias Weßendorf commented on MYFACES-1547:
-

please don't add complete files.
use patches instead.

thx

 ServletExternalContextImpl.redirect did not encode URL, so URL-rewriting fail
 -

 Key: MYFACES-1547
 URL: https://issues.apache.org/jira/browse/MYFACES-1547
 Project: MyFaces Core
  Issue Type: Bug
  Components: General
Affects Versions: 1.1.5
Reporter: Leif Hanack
 Assigned To: Matthias Weßendorf
 Attachments: ServletExternalContextImpl.java


 I'm using Spring WebFlow (SWF) in combination with MyFaces/Trinidad. I have 
 the problem that the FlowPhaseListener from SWF is calling a method that 
 triggers ServletExternalContextImpl.redirect be to called.
  
 ServletExternalContextImpl.java
 489public void redirect(String url) throws IOException
 490{
 491if (_servletResponse instanceof HttpServletResponse)
 492{
 493  ((HttpServletResponse)_servletResponse).sendRedirect(url);
 494   FacesContext.getCurrentInstance().responseComplete();   
  
 495}
 496else
 497{
 498throw new IllegalArgumentException(Only HttpServletResponse 
 supported);
 499}
 500}
 The redirect method is calling a sendRedirect on the response but did not 
 encode the url, so in case of URL-rewriting the jsessionid is not attached!
 This patch would solve my problem:
  
 replace line 493 with the following two lines:
 String encodedUrl = ((HttpServletResponse)_servletResponse).encodeURL(url);
 ((HttpServletResponse)_servletResponse).sendRedirect(encodedUrl);
  
 Thanks in advance, Leif

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



[jira] Commented: (MYFACES-1547) ServletExternalContextImpl.redirect did not encode URL, so URL-rewriting fail

2007-02-28 Thread Leif Hanack (JIRA)

[ 
https://issues.apache.org/jira/browse/MYFACES-1547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476585
 ] 

Leif Hanack commented on MYFACES-1547:
--

sorry, was in a hurry and this is my first experience with jira bug report:)


 ServletExternalContextImpl.redirect did not encode URL, so URL-rewriting fail
 -

 Key: MYFACES-1547
 URL: https://issues.apache.org/jira/browse/MYFACES-1547
 Project: MyFaces Core
  Issue Type: Bug
  Components: General
Affects Versions: 1.1.5
Reporter: Leif Hanack
 Attachments: ServletExternalContextImpl.java


 I'm using Spring WebFlow (SWF) in combination with MyFaces/Trinidad. I have 
 the problem that the FlowPhaseListener from SWF is calling a method that 
 triggers ServletExternalContextImpl.redirect be to called.
  
 ServletExternalContextImpl.java
 489public void redirect(String url) throws IOException
 490{
 491if (_servletResponse instanceof HttpServletResponse)
 492{
 493  ((HttpServletResponse)_servletResponse).sendRedirect(url);
 494   FacesContext.getCurrentInstance().responseComplete();   
  
 495}
 496else
 497{
 498throw new IllegalArgumentException(Only HttpServletResponse 
 supported);
 499}
 500}
 The redirect method is calling a sendRedirect on the response but did not 
 encode the url, so in case of URL-rewriting the jsessionid is not attached!
 This patch would solve my problem:
  
 replace line 493 with the following two lines:
 String encodedUrl = ((HttpServletResponse)_servletResponse).encodeURL(url);
 ((HttpServletResponse)_servletResponse).sendRedirect(encodedUrl);
  
 Thanks in advance, Leif

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