Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] [servlet] ProxyServlet handling of paths with extensions

Hi Raman,

Thanks I think I understand the problem you're running into.
I've opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=193857 to look at
it.

Could you try that patch out.

-Simon

equinox-dev-bounces@xxxxxxxxxxx wrote on 06/21/2007 07:50:26 PM:

>
> In ProxyServlet.processAlias, when an alias is passed with an extension,
the
> following code executes:
>
>     registration = (Registration) registrations.get(alias +
extensionAlias);
>     if (registration != null) // extensions should be handled on the full
> alias
>         alias = HttpServletRequestAdaptor.getDispatchPathInfo(req);
>     else
>         registration = (Registration) registrations.get(alias);
>
> Now, if the registration is not null, then this code sets the alias to
the
> entire request path. However, the following code in
> ResourceRegistration.handleRequest subsequently fails:
>
>     String pathInfo = HttpServletRequestAdaptor.getDispatchPathInfo(req);
>     int aliasLength = alias.equals("/") ? 0 : alias.length();
//$NON-NLS-1$
>     String resourcePath = internalName + pathInfo.substring(aliasLength);
>     URL testURL = httpContext.getResource(resourcePath);
>
> because pathInfo has the same value as alias, so
> pathInfo.substring(aliasLength) always results in a resourcePath of
> internalName.
>
> The following patch fixes all of my use cases:
>
> http://pastebin.ca/582438
>
> Cheers,
> Raman Gupta
>
> --
> View this message in context: http://www.nabble.com/-servlet--
> ProxyServlet-handling-of-paths-with-extensions-tf3962018.html#a11243866
> Sent from the Equinox - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top