Project

General

Profile

« Previous | Next » 

Revision 9535

Added by Chris Jones over 8 years ago

Modify the Metacat.pm upload() method to use the correct Content-Type for the form. RFC 2388 specifies that the Content-Type should be "multipart/form-data", and that the Content-Disposition should be "form-data", along with the "name" parameter.

View differences:

src/perl/Metacat/Metacat.pm
300 300
  my %postData = ( action => 'upload',
301 301
                   docid => $docid,
302 302
                   datafile => [$datafile, $filename],
303
                   enctype => 'form-data'
303
                   enctype => 'multipart/form-data'
304 304
                 );
305 305

  
306 306
  my $response = $self->sendData(%postData);

Also available in: Unified diff