From f719673263c19ff7acb7050fcc16170f906bc219 Mon Sep 17 00:00:00 2001 From: Roland Rosenfeld Date: Sat, 14 Oct 2006 11:16:11 +0000 Subject: [PATCH] * 27_remove_nsl.dpatch: Remove unnecessary linking against libnsl. * 28_usermanual_slash.dpatch: Redirect http://p.p/user-manual (without trailing slash) to http://p.p/user-manual/ (with trailing slash), otherwise the links will be broken (Closes: #244931). --- debian/patches/00list | 2 ++ debian/patches/27_remove_nsl.dpatch | 19 ++++++++++++++++++ debian/patches/28_usermanual_slash.dpatch | 24 +++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100755 debian/patches/27_remove_nsl.dpatch create mode 100755 debian/patches/28_usermanual_slash.dpatch diff --git a/debian/patches/00list b/debian/patches/00list index 279fcdbd..78ccd89f 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -14,3 +14,5 @@ 24_global_action.dpatch 25_standard_medium.dpatch 26_edit_only_writable.dpatch +27_remove_nsl.dpatch +28_usermanual_slash.dpatch diff --git a/debian/patches/27_remove_nsl.dpatch b/debian/patches/27_remove_nsl.dpatch new file mode 100755 index 00000000..4fc10dc4 --- /dev/null +++ b/debian/patches/27_remove_nsl.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 27_remove_nsl.dpatch by Roland Rosenfeld +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Remove unnecessary linking against libnsl. + +@DPATCH@ +diff -urNad privoxy~/configure.in privoxy/configure.in +--- privoxy~/configure.in ++++ privoxy/configure.in +@@ -869,7 +869,7 @@ + dnl ================================================================= + + dnl Next line needed to find the gethost*_r functions on Solaris +-AC_CHECK_LIB(nsl, gethostbyname) ++dnl AC_CHECK_LIB(nsl, gethostbyname) + + AC_CHECK_FUNC(gethostbyaddr_r, [ + AC_MSG_CHECKING([signature of gethostbyaddr_r]) diff --git a/debian/patches/28_usermanual_slash.dpatch b/debian/patches/28_usermanual_slash.dpatch new file mode 100755 index 00000000..20a64e96 --- /dev/null +++ b/debian/patches/28_usermanual_slash.dpatch @@ -0,0 +1,24 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 28_usermanual_slash.dpatch by Roland Rosenfeld +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Redirect http://p.p/user-manual (without trailing slash) to +## DP: http://p.p/user-manual/ (with trailing slash), otherwise the links +## DP: will be broken (#244931). + +@DPATCH@ +diff -urNad privoxy~/cgisimple.c privoxy/cgisimple.c +--- privoxy~/cgisimple.c ++++ privoxy/cgisimple.c +@@ -716,6 +716,11 @@ + assert(rsp); + assert(parameters); + ++ if (!parameters->first) { ++ /* requested http://p.p/user-manual (without trailing slash) */ ++ return cgi_redirect(rsp, CGI_PREFIX "user-manual/"); ++ } ++ + get_string_param(parameters, "file", &filename); + /* Check paramter for hack attempts */ + if (filename && strchr(filename, '/')) -- 2.39.2