Edgewall Software

Opened 9 years ago

Closed 9 years ago

#657 closed defect (fixed)

Binary files attached by Windows slave are truncated

Reported by: dave@… Owned by:
Priority: critical Milestone: 0.6
Component: General Version: 0.6b3
Keywords: slave, attach Cc:
Operating System: Windows


When processing an 'attach' recipe command the Bitten slave opens the file to be attached without specifying a file mode. When running on Windows this means the file is opened in text mode. As a result, all attached files get truncated at the first occurrence of a Ctrl-Z character.

A simple fix is to modify line 515 in slave.py to read:

f = open(path, 'rb')

This bug appears to still be present in trunk:

513	        log.debug('Attaching file %s to %s...', attachment.attr['filename'],
514	                                                    resource_type)
515	        f = open(path)
516	        try:
517	            data, content_type = encode_multipart_formdata({

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by osimons

  • Milestone changed from 0.6.1 to 0.6
  • Resolution set to fixed
  • Status changed from new to closed

Good catch, thanks! Fixed in [968] for trunk and merged to 0.6 branch in [969].

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.