From 2698077b60939a858ecaaf1ccde01591170f0a2c Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 9 Aug 2006 23:30:20 +0200 Subject: [PATCH] Last change broke uploads altogether. Fix. --- perl/Sesse/pr0n/WebDAV.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perl/Sesse/pr0n/WebDAV.pm b/perl/Sesse/pr0n/WebDAV.pm index 0f56f64..2a974e2 100644 --- a/perl/Sesse/pr0n/WebDAV.pm +++ b/perl/Sesse/pr0n/WebDAV.pm @@ -10,10 +10,6 @@ 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"; # We only handle depth=0, depth=1 (cf. the RFC) @@ -42,6 +38,10 @@ sub handler { # Directory listings et al if ($r->method eq "PROPFIND") { + # 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->content_type('text/xml; charset="utf-8"'); $r->status(207); -- 2.39.2