Ticket #422 (closed defect: fixed)

Opened 21 months ago

Last modified 18 months ago

Error when submitting form with empty file field

Reported by: al Owned by: ianb
Priority: normal Milestone: 1.4.1
Component: webtest Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

An errors occurs when submitting an upload form if no file has been selected. In some applications, a form can contain multiple field along with an optional file field, so I think WebTest? should not require a file in order to submit the form successfully.

In the attached patch, I've modified test_no_uploads_error to trigger the problem and added a check in encode_multipart() to skip empty file fields.

Attachments

empty_file_field_error.patch Download (1.8 KB) - added by al 21 months ago.

Change History

Changed 21 months ago by al

Changed 18 months ago by ianb

  • status changed from new to closed
  • resolution set to fixed

Fixed previously 98:985c0d9da396 (different patch I believe)

Note: See TracTickets for help on using tickets.