Comment #13 on issue 522 by [email protected]: Servlet forwards from servlets with pathinfo mishandled
http://code.google.com/p/google-guice/issues/detail?id=522

Hi,
Sorry for the noise. I have been bitten by this issue too - both 455 and 522 - so I took a serious look at it in the last couple of days and I believe that I have identified the problem and a possible solution (in the attached patch).

The root of the problem is that Guice's handling of include() and forward() doesn't duplicate everything that a servlet container would do - restoring the query, path, attributes, etc.

One way to handle it properly is to let the servlet container perform the forward() or include() and get control into Guice again after that. Also, the request must be unwrapped to take care of the memoization problem.

In addition to the attached patch, a second filter for include and forward must be installed in web.xml (see the description in the patch).

The attached patch is against Guice-2.0 Stable. It seems to resolve the issues for me and seems to work OK after some minimal testing.

More importantly, I do feel that it is doing the right thing conceptually. Hope this helps, and any comments are welcome.

Attachments:
        0001-guice-servlet-2.0-patched-fix-Guice-issues-455-and-5.patch  15.6 KB

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to