[Catalyst] Chained, slashes, and escaping

Carl Johnstone catalyst at fadetoblack.me.uk
Tue Mar 6 13:13:37 GMT 2007


>> When I access the following URI:
>>
>> /tag/sl%2Fashes
>>
>> $tag gets set to sl instead of sl/ashes.
>
> Apparently back in the early days of the web, a URL like that caused 
> problems

I ran into this a couple of weeks ago. As far as I could the development 
myapp_server actually deals with everything correctly.

In Apache:

You can now allow encoded slashes in Apache > 2.0.46 with:

  AllowEncodedSlashes On


If you're using mod_perl though, when Catalyst fetches the URI from apache 
it requests the parsed vesion so for your example would get back 
/tag/sl/ashes

You can customise Catalyst::Engine::Apache to use unparsed_uri and split off 
the query string - which seems to work OK for my simple case, but I didn't 
test any further.

See:

http://lists.scsys.co.uk/pipermail/catalyst-dev/2007-February/000578.html

Carl







More information about the Catalyst mailing list