Subject: | Unescape incoming URIs |
Date: | Sun, 14 Jan 2007 23:09:36 +0100 |
To: | bug-Net-HTTPServer [...] rt.cpan.org |
From: | Armin Wolfermann <aw [...] osn.de> |
URIs with escaped characters (as defined by RFC 2396) don't work with
Net::HTTPServer. This patch solved the problem for me:
--- Request.pm.orig 2007-01-14 22:51:41.000000000 +0100
+++ Request.pm 2007-01-14 22:51:03.000000000 +0100
@@ -340,7 +340,7 @@
#-------------------------------------------------------------------------
# What did they ask for?
#-------------------------------------------------------------------------
- $self->{PATH} = $self->_chroot($uri->path());
+ $self->{PATH} = $self->_chroot(uri_unescape($uri->path()));
my ($headers,$body) = ($self->{REQUEST} =~ /^(.+?)\015?\012\015?\012(.*?)$/s);