Bug 112267 - BaseDispatcher does not include prefix when redirecting
Summary: BaseDispatcher does not include prefix when redirecting
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: other
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: ccm-bugs-list
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-16 20:29 UTC by Randy Graebner
Modified: 2020-03-27 16:47 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 16:47:10 UTC
Embargoed:


Attachments (Terms of Use)

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.


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