Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian....@packages.debian.org
Usertags: pu

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I've prepared an update for libhttp-proxy-perl in jessie to fix
#788350. The update adds a patch from the recent upstream release
(which is in testing/unstable, and we've also used the patch before
it was released). Full debdiff attached.

Cheers,
gregor

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAlke/epfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgYLzg/9HYuhzXIoy+VpwwGjdo+gb44frK3nhn7tK3GySsxsbGXXAL+yjmiNjo8C
CeiU621CEAow+c0e1prIcevforauy1nSqHe/rw18iI+1pTSZJE5IYsIVgXGiRzJ+
eYQBKe/JoAWc4yid6CZ58HS2ULENvxhSsxHh/fJ9PQnGkQLHMGNJg3cBftiFS8li
dAtokFh0Fw5qGDFX0sWjZvoTMIyC/KHKEuFdQMcMLCiRsMo9rP/YNXSsDFfdhbMi
rZs3K6vTcKasJ1jDjgvjdhl6FJVqiUL95xtee2WbBWh2RpGbpCsCyi6jKq66Eoah
hxVu1E2kYFjmxSCsh6woCEbF4w7ezUjyA/5FfJ7Yy5A/DOttgJU2/1/WovUQ/k9K
zRB56z3cJPU0iPyezWCyTP079gQbFv77umoJoC0kHx+y25He8Fsv4g8e5oqDdGMf
qG/n50YVvFRWxwpTP6Bjt9P/lGClsPHoAtOn4TgkRCutTwIiReuVpIRotJXPIe9E
YxSC9j/6aUIPY5GYNqauDnmx9U4UeBNPzJsT4kgcXu0BeZ60HfjNQrd7lzNb1x/S
9pc/4j9lucVl1fpkH30fLSx+SboBe+I/CWfljFGUnF9H+9VWAMiVI5rB3SPFsRyc
MhIgJwWd0yzV71jxyiH/wNqUp+o+TV5nack0+CoPXre6w1a1S6g=
=i7gm
-----END PGP SIGNATURE-----
diff --git a/debian/changelog b/debian/changelog
index 3ee3d48..80d7b02 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libhttp-proxy-perl (0.301-1+deb8u1) UNRELEASED; urgency=medium
+
+  * Add patch to fix broken custom 'via' handling.
+    (Patch taken from upstream release 0.304.)
+    (Closes: #788350)
+
+ -- gregor herrmann <gre...@debian.org>  Fri, 19 May 2017 15:43:44 +0200
+
 libhttp-proxy-perl (0.301-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/patches/0001-add-port-to-Via-header.patch 
b/debian/patches/0001-add-port-to-Via-header.patch
new file mode 100644
index 0000000..7e26423
--- /dev/null
+++ b/debian/patches/0001-add-port-to-Via-header.patch
@@ -0,0 +1,38 @@
+From e105876f84220791f2a6b1e64d2a913658c1d269 Mon Sep 17 00:00:00 2001
+From: Slaven Rezic <sla...@rezic.de>
+Date: Fri, 12 Nov 2010 11:37:59 +0100
+Subject: [PATCH] add port to Via header
+
+RFC 2616 kind of suggests to add the port to the Via header if it's not
+the default port:
+
+    "If the port is not given, it MAY be assumed to be the default port
+    of the received-protocol."
+
+This patch sets the port in the generated Via header if it's not the
+default 80.
+---
+ lib/HTTP/Proxy.pm | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/lib/HTTP/Proxy.pm
++++ b/lib/HTTP/Proxy.pm
+@@ -91,7 +91,6 @@
+         port     => 8080,
+         stash    => {},
+         timeout  => 60,
+-        via      => hostname() . " (HTTP::Proxy/$VERSION)",
+         x_forwarded_for => 1,
+     );
+ 
+@@ -117,6 +116,10 @@
+     $self->{$_} = exists $params{$_} ? delete( $params{$_} ) : $defaults{$_}
+       for keys %defaults;
+ 
++    if (!defined $self->{via}) {
++      $self->{via} = hostname() . ($self->{port} != 80 ? ':' . $self->{port} 
: '') . " (HTTP::Proxy/$VERSION)";
++    }
++
+     # choose an engine with the remaining parameters
+     $self->{engine} = HTTP::Proxy::Engine->new( %params, proxy => $self );
+     $self->log( PROXY, "PROXY", "Selected engine " . ref $self->{engine} );
diff --git a/debian/patches/series b/debian/patches/series
index 55d236c..b990146 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 hashbang.patch
 spelling.patch
+0001-add-port-to-Via-header.patch

Reply via email to