Hi all,

Even I can't understand whole picture,
I think I found some clue for solving the Infinite redirect problem.
( Because the ParameterParser implements Hashtable , It can't represent
whole PathInfo.
for example in case of http://myserver/turbine/screen/myhome/screen/myhome
the ParameterParse add only one "screen" , "myhome" to duri object at the
first request time in Turbine.java,
actual path has two "screen" and two "myhome" )
So the patch is
In Turbine.java
line 251- 256
    - for (Enumeration e = data.getParameters().keys() ; e.hasMoreElements()
;)
    - {
    -     String key = (String) e.nextElement();
    -     String value = (String) data.getParameters().getString ( key );
    -     duri.addPathInfo((String)key, (String)value );
    - }

    + try
    + {
    +     StringTokenizer st = new StringTokenizer(req.getPathInfo(), "/");
    +     boolean name = true;
    +     String tmp = null;
    +     String tmp2 = null;
    +     while(st.hasMoreTokens())
    +     {
    +         if ( name == true )
    +         {
    +             tmp = JServUtils.URLDecode(st.nextToken());
    +             name = false;
    +          }
    +         else
    +          {
    +             tmp2 = JServUtils.URLDecode(st.nextToken());
    +             if ( tmp.length() != 0 )
    +             {
    +                 duri.addPathInfo((String) ParameterParser.convert(tmp)
,  tmp2);
    +             }
    +              name = true;
    +          }
    +      }
    +   }
    +   catch ( Exception e )
    +   {
    +   }

I borrowed the obove patch code from ParameterParser.java.
If I am scratching wrong place , please let me know.

Thanks,

youngho



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to