Modify ↓
Opened 6 years ago
Closed 6 years ago
#13612 closed defect (fixed)
AttributeError: 'NoneType' object has no attribute 'split' when downloading a file
| Reported by: | matobaa | Owned by: | matobaa |
|---|---|---|---|
| Priority: | normal | Component: | ArchiveViewerPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 1.4 |
Description
AttributeError occurs when download a file in a zip it has not registered its mimetype
example: COPYING
File "c:/users/matob/onedrive/trac/.venv/lib/site-packages/trac/web/main.py", line 639 , in dispatch_request
File "c:/users/matob/onedrive/trac/.venv/lib/site-packages/trac/web/main.py", line 250 , in dispatch
File "c:/users/matob/onedrive/trac/archiveviewerplugin/1.0/archiveviewer/zip.py", line 309 , in process_request
309 req.send_header('Content-Type', mime_type)
mime_type None
File "c:/users/matob/onedrive/trac/.venv/lib/site-packages/trac/web/api.py", line 719 , in send_header
718 if name.lower() == 'content-type':
719 self._content_type = value.split(';', 1)[0]
value None
Attachments (0)
Note: See
TracTickets for help on using
tickets.



In 17508: