Author: joes
Date: Sat Apr 16 13:46:59 2005
New Revision: 161604

URL: http://svn.apache.org/viewcvs?view=rev&rev=161604
Log:
Empty bodies should yield an empty return.

Modified:
    httpd/apreq/branches/multi-env-unstable/glue/perl/lib/Apache2/Upload.pm

Modified: 
httpd/apreq/branches/multi-env-unstable/glue/perl/lib/Apache2/Upload.pm
URL: 
http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/lib/Apache2/Upload.pm?view=diff&r1=161603&r2=161604
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/lib/Apache2/Upload.pm 
(original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/lib/Apache2/Upload.pm Sat 
Apr 16 13:46:59 2005
@@ -7,11 +7,10 @@
 }
 sub Apache2::Request::upload {
     my $req = shift;
-    my $body = $req->body;
+    my $body = $req->body or return;
     $body->param_class(__PACKAGE__);
-    my @uploads;
     if (@_) {
-        @uploads = grep $_->upload, $body->get(@_);
+        my @uploads = grep $_->upload, $body->get(@_);
         return wantarray ? @uploads : $uploads[0];
     }
 


Reply via email to