summaryrefslogtreecommitdiff
path: root/package/uhttpd/src/uhttpd.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-11-10 20:52:30 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-11-10 20:52:30 +0000
commit5931a158a4df45904b28bcd8e85cbddca61e4b7d (patch)
treefb751b937da3f72bab5d5b31e444b2ba61f5a453 /package/uhttpd/src/uhttpd.c
parent507986e6f60fc306baddec6229f0e100df28c666 (diff)
downloadmtk-20170518-5931a158a4df45904b28bcd8e85cbddca61e4b7d.zip
mtk-20170518-5931a158a4df45904b28bcd8e85cbddca61e4b7d.tar.gz
mtk-20170518-5931a158a4df45904b28bcd8e85cbddca61e4b7d.tar.bz2
uhttpd: redirect to same location with trailing slash appended if directories are requested
SVN-Revision: 23952
Diffstat (limited to 'package/uhttpd/src/uhttpd.c')
-rw-r--r--package/uhttpd/src/uhttpd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c
index a818e1c..491452b 100644
--- a/package/uhttpd/src/uhttpd.c
+++ b/package/uhttpd/src/uhttpd.c
@@ -566,7 +566,7 @@ static void uh_mainloop(struct config *conf, fd_set serv_fds, int max_fd)
if( (pin = uh_path_lookup(cl, req->url)) != NULL )
{
/* auth ok? */
- if( uh_auth_check(cl, req, pin) )
+ if( !pin->redirected && uh_auth_check(cl, req, pin) )
uh_dispatch_request(cl, req, pin);
}
@@ -1089,4 +1089,3 @@ int main (int argc, char **argv)
return 0;
}
-