Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#1417 closed defect (fixed)

TypeError: content_type must be a string

Reported by: dna Owned by: Christopher Lenz
Priority: high Milestone: 0.9
Component: web frontend/mod_python Version: devel
Severity: critical Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

when you try downloading a file using the "Download Original Format" link following error is released.

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 237, in handler
    dispatch_request(mpr.path_info, mpr, env)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 311, in dispatch_request
    module.render(req)
  File "/usr/lib/python2.3/site-packages/trac/Browser.py", line 83, in render
    self.render_file(req, repos, node, rev)
  File "/usr/lib/python2.3/site-packages/trac/Browser.py", line 153, in render_file
    req.send_header('Content-Type', node.content_type)
  File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 101, in send_header
    self.req.content_type = value
TypeError: content_type must be a string

Apache 2.0.53, mod_python 3.1.4, Trac [1503]

Attachments (0)

Change History (8)

comment:1 by anonymous, 20 years ago

Version: devel0.5.1

comment:2 by Matthew Good, 20 years ago

Version: 0.5.1devel

Please don't change the version for no reason.

comment:3 by Christopher Lenz, 20 years ago

Component: browsermod_python frontend
Keywords: Download in original format removed
Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

comment:4 by Christopher Lenz, 20 years ago

Do you know what the content type of the file was?

comment:5 by Christopher Lenz <cmlenz@…>, 20 years ago

Okay, this happens for any file that doesn't have a content type set in the repos.

comment:6 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in [1592].

comment:7 by sam, 20 years ago

Resolution: fixed
Status: closedreopened

Still does not work for files without content type :

https://ssl.bulix.org/projects/zwe/browser/trunk/AUTHOR?rev=&format=raw

Apache/2.0.54, mod_python 3.1.3, Trac [1598]

comment:8 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: reopenedclosed

Resolved on IRC, apache needed to be restarted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.