X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=509585f218c4dcdc9814e0fa67ae24484945a2ea;hb=790ff9aafa57fa7945844173627d2c42f76d8739;hp=69563d967b4711bd5746bb5cbbe692d8064b0a9c;hpb=6356febf43d63d59631124c80b39f89308d92f55;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 69563d9..509585f 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -311,6 +311,8 @@ Clean up after uploads, deleting temp files. sub finalize_uploads { my ( $self, $c ) = @_; + # N.B. This code is theoretically entirely unneeded due to ->cleanup(1) + # on the HTTP::Body object. my $request = $c->request; foreach my $key (keys %{ $request->uploads }) { my $upload = $request->uploads->{$key}; @@ -335,6 +337,7 @@ sub prepare_body { unless ( $request->_body ) { my $type = $request->header('Content-Type'); $request->_body(HTTP::Body->new( $type, $length )); + $request->_body->cleanup(1); # Make extra sure! $request->_body->tmpdir( $appclass->config->{uploadtmp} ) if exists $appclass->config->{uploadtmp}; }