1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 28_usermanual_slash.dpatch by Roland Rosenfeld <roland@debian.org>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Redirect http://p.p/user-manual (without trailing slash) to
6 ## DP: http://p.p/user-manual/ (with trailing slash), otherwise the links
7 ## DP: will be broken (#244931).
10 diff -urNad privoxy~/cgisimple.c privoxy/cgisimple.c
11 --- privoxy~/cgisimple.c
12 +++ privoxy/cgisimple.c
17 + if (!parameters->first) {
18 + /* requested http://p.p/user-manual (without trailing slash) */
19 + return cgi_redirect(rsp, CGI_PREFIX "user-manual/");
22 get_string_param(parameters, "file", &filename);
23 /* Check paramter for hack attempts */
24 if (filename && strchr(filename, '/'))