PDA

View Full Version : Does the SVN trunk contain the most recent Resin (4.0.17)?


mhixson
04-12-2011, 02:33 AM
Locally I'm running Resin as an Eclipse project pointing to this subversion repository:

svn://svn.caucho.com/resin/trunk

Is that the most recent version of Resin?

The reason I ask is, I filed a bug report:

http://bugs.caucho.com/view.php?id=4490

The issue is marked as "fixed" but I still see the problematic behavior. I'm on revision 8015. I thought it might be bad behavior to re-file the bug report if I'm simply misunderstanding where I should look for the latest code.

caucho
04-14-2011, 02:49 AM
Yes, that's the right location.

The behavior is the same in both configuration styles in our tests.

mhixson
04-14-2011, 04:46 AM
Ok, thanks. I'll try to figure out why I'm still seeing the old behavior. I see the fix you made in the source, but when I use <rewrite-dispatch><forward> it doesn't appear to go down that code path.

Sometime since I filed the report about <resin:Forward>, my application no longer allows me to use that syntax in web.xml (it complains that <resin:Forward> is not an expected child of web-app), but I can still use <rewrite-dispatch><forward>, so there may be something wonky with my setup.

ferg
04-14-2011, 10:33 PM
For the second issue, do you have the namespaces configured properly?

<web-app xmlns="http://caucho.com/ns/resin"
xmlns:resin="urn:java:com.caucho.resin">

Resin's validation depends on the namespace.

mhixson
04-14-2011, 11:43 PM
Ah, yes, my xmlns:resin was wrong.

I do still see duplicate parameters with <rewrite-dispatch><forward> though. In my web.xml:


<rewrite-dispatch>
<forward regexp="^/logout$" target="/?cmd=logout" />
</rewrite-dispatch>
<resin:Forward regexp="^/login$" target="/?cmd=login" />


/login?foo=bar


Arrays.toString(request.getParameterValues("foo")) => [bar]


/logout?foo=bar


Arrays.toString(request.getParameterValues("foo")) => [bar, bar]


I'm now on revision 8023. I also added a line in com.caucho.rewrite.Forward:


@Override
protected String rewriteTarget(Matcher matcher,
String uri,
String queryString)
{
System.err.println("Woohoo!: " + uri + "?" + queryString);
// server/1kna
queryString = null;


That "queryString = null;" line was the fix for the <resin:Forward> issue, right? When I got to /login I do see the "Woohoo!" message in the console, but when I go to /logout I don't.

Is there anything you'd like me to try? I'm not sure what else to do at this point. How did you test that <rewrite-dispatch><forward> was fixed?

ferg
04-15-2011, 05:56 PM
Ok, I'll need to look at this for 4.0.18 (since 4.0.17 is being released today.)

Our test is the exact same as for the resin:Forward, but changing syntax. But clearly there must be something missing in that test.

mhixson
04-16-2011, 04:43 AM
Cool. I'm subscribed to this thread so if you need anything from me, let me know!

ferg
04-26-2011, 06:20 PM
I'm still not seeing the behavior with 4.0.17. My resin-web.xml looks like


<web-app xmlns="http://caucho.com/ns/resin"
xmlns:resin="urn:java:com.caucho.resin">

<rewrite-dispatch>
<forward regexp='^/foo' target='/?q=foo'/>
</rewrite-dispatch>
<resin:Forward regexp='^/bar' target='/?q=bar'/>

<servlet-mapping url-pattern="/" servlet-class="qa.MyServlet"/>
</web-app>