From e585cd16c0eb30ce4568a280329ab5f8b4ff5a39 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Fri, 20 Feb 2009 15:55:59 +0100
Subject: [PATCH] LWP 5.815 changed response of failed collect() callbacks: previously
 it generated a 500 HTTP::Response object, now it just sets the X-Died
 header. This caused test number 28 to fail. This patch fixes this by
 restoring the old behaviour again.

---
 lib/LWPx/Protocol/http_paranoid.pm |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/LWPx/Protocol/http_paranoid.pm b/lib/LWPx/Protocol/http_paranoid.pm
index 0d00b6f..aae5671 100644
--- a/lib/LWPx/Protocol/http_paranoid.pm
+++ b/lib/LWPx/Protocol/http_paranoid.pm
@@ -353,6 +353,10 @@ sub request
 	$complete++ if !$n;
         return \$buf;
     } );
+    if ($response->header('X-Died')) {
+	$response = HTTP::Response->new(&HTTP::Status::RC_INTERNAL_SERVER_ERROR,
+					$response->header('X-Died'));
+    }
     $drop_connection++ unless $complete;
 
     _set_time_remain();
-- 
1.5.6.5