dev@glassfish.java.net

Re: REST API and slashes in resource names

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Wed, 02 Jun 2010 11:59:54 -0700

Ken Paulsen wrote on 06/ 2/10 10:49 AM:
>
> I think the reason it is decoded is this: The Container receives a
> request like "/foo/at%40test.html" which then must be decoded to serve
> up a file named "/foo/at_at_test.html". '@' and many other characters not
> allowed in URLs must be encoded when they're used in a file name, so the
> container must decoded them *before attempting to resolve them*.

I guess the issue is whether that decoding should be done before
interpreting the string to choose the destination servlet or
whether the destination servlet (e.g., the default file handling
servlet) should do the decoding before using the value.

I would expect the Servlet spec to say something about this. If
it requires the decoding to be done before passing the value to the
Servlet, there may be little we can do.

If there's a mapping for /foo/bar/*, should a URL of the form
/foo%2Fbar/index.html match it?