Bug 112267 - BaseDispatcher does not include prefix when redirecting
BaseDispatcher does not include prefix when redirecting
Status: ON_QA
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-16 15:29 EST by Randy Graebner
Modified: 2008-05-01 11:39 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Randy Graebner 2003-12-16 15:29:48 EST
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 15:30:55 EST
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-17 23:17:03 EDT
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future.
Moving to ON_QA.

Note You need to log in before you can comment on or make changes to this bug.