Edgewall Software

Ticket #7389 (new defect)

Opened 3 months ago

Last modified 3 months ago

[PATCH] Filesize less than original when downloading file under SSL

Reported by: zoltan.kovacs@… Owned by:
Priority: normal Milestone:
Component: web frontend Version:
Severity: normal Keywords: ssl, https, download
Cc:

Description

When using Trac under HTTPS connection, the files downloaded using the send_file() function from apy.py has differ from original. The solution is to add 'Pragma: no-cache' header to the function.

Attachments

Change History

in reply to: ↑ description   Changed 3 months ago by zoltan.kovacs@…

I cannot add attachment to ticket (internal trac error - UnicodeDecode?), so I copy the patchfile to here:

Index: api.py
===================================================================
--- api.py      (revision 7274)
+++ api.py      (working copy)
@@ -386,6 +386,7 @@
                        'application/octet-stream'

         self.send_response(200)
+       self.send_header('Pragma', 'no-cache')
         self.send_header('Content-Type', mimetype)
         self.send_header('Content-Length', stat.st_size)
         self.send_header('Last-Modified', last_modified)

Replying to zoltan.kovacs@unitechnal.ch:

When using Trac under HTTPS connection, the files downloaded using the send_file() function from apy.py has differ from original. The solution is to add 'Pragma: no-cache' header to the function.

Add/Change #7389 ([PATCH] Filesize less than original when downloading file under SSL)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from (none). Next status will be 'new'
The owner will change from (none) to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.