#7389 closed defect (wontfix)
[PATCH] Filesize less than original when downloading file under SSL
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | web frontend | Version: | |
| Severity: | normal | Keywords: | ssl https download needinfo |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
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 (0)
Change History (7)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
| Keywords: | needinfo added |
|---|
I don't understand what the issue is. Do you mean that you can upload an attachment using HTTPS, and when you download it back, it differs from the original?
Could you please provide step-by-step instructions to reproduce the issue? Also specify the versions of the various components of your Trac installation, and what handler you use (tracd, mod_python, mod_wsgi).
follow-up: 5 comment:3 by , 17 years ago
I guess when downloading a version of an already existing file, then uploading a newer version and then downloading it again, the old version ist still "downloaded" from the local browser cache. I know that behaviour from various web sites.
comment:4 by , 17 years ago
Isn't that what the Last-Modified header is designed to avoid? I think Trac sets it to the mtime of the attachment, which should get updated when the attachment is replaced.
It is also strange that this only seems to happen with HTTPS connections.
comment:5 by , 17 years ago
| Milestone: | → 0.11.6 |
|---|
Replying to anonymous:
I guess when downloading a version of an already existing file, then uploading a newer version and then downloading it again, the old version ist still "downloaded" from the local browser cache.
That would be a bug, need to verify.
comment:6 by , 16 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
No feedback provided to comment:2, closing.
comment:7 by , 16 years ago
| Milestone: | 0.12.1 |
|---|



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: