[racket] Apache redirections

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Feb 9 09:18:50 EST 2011

2011/2/8 Neil Van Dyke <neil at neilvandyke.org>:
> Eli Barzilay wrote at 02/08/2011 11:51 AM:
>>
>> [...] It looks like in recent versions of apache (2.2.17) when rewrite
>> rules are applied the URIs will always get escaped.  This leads to problems
>> with the racket server's urls -- something like "servlets;blah" gets
>> substituted as "servlets%3Bblah", which means that the ";" lost its [...]
>>
>
> Looks like there's been a standards change, and you might want to change the
> Racket Web Server...
>
> I'm not sure what happened, but RFC 2396 used to give special meaning to
> semicolon (denoting parameters on path segments in hierarchical URIs), but
> that was obsoleted by RFC 3986, which seemed to remove the special meaning.
>
> I've never seen anyone use semicolons in the RFC 2396 intended way in
> practice.  The PLT Web Server and a couple of other frameworks use them only
> on the last path segment (in RFC 2396 interpretation).
>
> In light of the interpretation of RFC 3986, perhaps the Racket Web Server
> should resort to parsing the ";" out of the last path segment, after
> unescaping.  Alternatively, stop using semicolon, and put the information in
> an (HTML form GET-like) name-value query parameter of the HTTP URL instead.

A little background...

* The Web server has always used this, so the design choice didn't
originate with me.

* When *I* think about why it is a good idea, here's what I come up
with: using a GET parameter would potentially conflict with the
servlet and would be more visible (through request-bindings) to the
servlet [the parameter is still visible, but is harder to see]; the
fact that path parameters are used so infrequently is actually a
feature because it is so much less likely to conflict with something
the servlet will be trying to do. It is hard to customize this on a
servlet-by-servlet basis, because the key in the URL is what allows
the Web server to associate the request with a servlet (which is where
this customization would live), so it is (kind of) the one part that
can't really be customized.

Jay

>
> There might be newer specs I'm not aware of.  I last implemented RFC 2396,
> and actually had robust and efficient support for semicolon as they wanted
> it at the time. :)
>
> --
> http://www.neilvandyke.org/
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93



Posted on the users mailing list.