Skip to content

Commit 5c3ff4b

Browse files
author
Ralf Schlatterbeck
committed
Fix traceback on .../msgN/ url...
...this requests the file content and for apache mod_wsgi produced a traceback because the mime type is None for messages, fixes issue2550586, thanks to ThomasAH for reporting and to Intevation for funding the fix.
1 parent 2ab8c7c commit 5c3ff4b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Fixes:
2121
sent via email. We now check that user has permission on the message
2222
content and files properties. Thanks to Intevation for funding this
2323
fix.
24+
- Fix traceback on .../msgN/ url, this requests the file content and for
25+
apache mod_wsgi produced a traceback because the mime type is None for
26+
messages, fixes issue2550586, thanks to ThomasAH for reporting and to
27+
Intevation for funding the fix.
2428

2529

2630
2009-10-09 1.4.10 (r4374)

roundup/cgi/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,9 @@ def serve_file(self, designator, dre=re.compile(r'([^\d]+)(\d+)')):
880880
"this file.")
881881

882882
mime_type = klass.get(nodeid, 'type')
883+
# Can happen for msg class:
884+
if not mime_type:
885+
mime_type = 'text/plain'
883886

884887
# if the mime_type is HTML-ish then make sure we're allowed to serve up
885888
# HTML-ish content

0 commit comments

Comments
 (0)