Bug 112267

Summary: BaseDispatcher does not include prefix when redirecting
Product: [Retired] Red Hat Web Application Framework Reporter: Randy Graebner <randyg>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED EOL QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 16:47:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Randy Graebner 2003-12-16 20:29:48 UTC
Description of problem:
When the BaseDispatcher realizes that a URL should have a trailing
slash, it redirects the user to the same URL with the additional "/".
 However, it was ignoring the prefix that was set in DispatcherHelper
so it would go to the wrong URL.  This caused problems with the Theme
application.  Specifically, when previewing a theme, if the user went
to /theme/myTheme/ccm then they are redirected to /ccm/ when I would
expect to be redirected to /theme/myTheme/ccm/

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1.  Install the Theme App (or something else that uses the
InternalPrefixerServlet)
2.  Go to a url that should end in "/" but does not
3.
  
Actual results:
redirected without the prefix

Expected results:
redirected with the prefix

Additional info:

Comment 1 Randy Graebner 2003-12-16 20:30:55 UTC
The patch for this was submitted with change 38869

[randyg@graebner aplaws]$ p4 describe 38869
Change 38869 by randyg@randyg-aplaws-rickshaw on 2003/12/16 15:08:57

	When the BaseDispatcher redirects because the page was missing its
	   trailing slash it needs to include any prefix that was previously
	   stripped off.  This diff adds the prefix.

Affected files ...

... //core-platform/dev/src/com/arsdigita/web/BaseDispatcher.java#20 edit

Differences ...

==== //core-platform/dev/src/com/arsdigita/web/BaseDispatcher.java#20
(ktext) ====

42c42
<  * @version $Id:
//core-platform/dev/src/com/arsdigita/web/BaseDispatcher.java#19 $
---
>  * @version $Id:
//core-platform/dev/src/com/arsdigita/web/BaseDispatcher.java#20 $
46,48c46,48
<         "$Id:
//core-platform/dev/src/com/arsdigita/web/BaseDispatcher.java#19 $" +
<         "$Author: jorris $" +
<         "$DateTime: 2003/10/30 18:19:24 $";
---
>         "$Id:
//core-platform/dev/src/com/arsdigita/web/BaseDispatcher.java#20 $" +
>         "$Author: randyg $" +
>         "$DateTime: 2003/12/16 15:08:57 $";
86c86,90
<             final String uri = sreq.getRequestURI();
---
>             final String prefix =
DispatcherHelper.getDispatcherPrefix(sreq);
>             String uri = sreq.getRequestURI();
>             if (prefix != null && prefix.trim().length() > 0) {
>                 uri = prefix + uri;
>             }

Comment 2 David Lawrence 2006-07-18 03:17:03 UTC
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future.
Moving to ON_QA.