From 97587692088c0aebc302164e335817f5dfedc49f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 9 Aug 2006 22:55:52 +0200 Subject: [PATCH] When using WebDAV, make sure the entire body is in before we start sending out stuff ourselves. This fixes an extremely long-standing bug with Squid. --- perl/Sesse/pr0n/WebDAV.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perl/Sesse/pr0n/WebDAV.pm b/perl/Sesse/pr0n/WebDAV.pm index 7621154..a391c07 100644 --- a/perl/Sesse/pr0n/WebDAV.pm +++ b/perl/Sesse/pr0n/WebDAV.pm @@ -9,6 +9,10 @@ use MIME::Base64; sub handler { my $r = shift; my $dbh = Sesse::pr0n::Common::get_dbh(); + + # We ignore the body, but we _must_ consume it fully before + # we output anything, or Squid will get seriously confused + $r->discard_request_body; $r->headers_out->{'DAV'} = "1,2"; -- 2.39.2