Opened 14 years ago

Closed 11 years ago

#2989 defect closed wontfix (wontfix)

mime-type option for web2 causes error

Reported by: Drew Smathers Owned by:
Priority: normal Milestone:
Component: web2 Keywords:
Cc: Branch:
Author:

Description

$  twistd web2 --path=blah/ --mimetype="jsp=text/html"
Traceback (most recent call last):
  File "/opt/pyinstances/twisted/bin/twistd", line 21, in <module>
    run()
  File "/opt/pyinstances/twisted/lib/python2.5/site-packages/twisted/scripts/twistd.py", line 27, in run
    app.run(runApp, ServerOptions)
  File "/opt/pyinstances/twisted/lib/python2.5/site-packages/twisted/application/app.py", line 425, in run
    config.parseOptions()
  File "/opt/pyinstances/twisted/lib/python2.5/site-packages/twisted/application/app.py", line 405, in parseOptions
    usage.Options.parseOptions(self, options)
  File "/opt/pyinstances/twisted/lib/python2.5/site-packages/twisted/python/usage.py", line 231, in parseOptions
    self.subOptions.parseOptions(rest)
  File "/opt/pyinstances/twisted/lib/python2.5/site-packages/twisted/python/usage.py", line 219, in parseOptions
    self._dispatch[optMangled](optMangled, arg)
  File "/opt/pyinstances/twisted/lib/python2.5/site-packages/twisted/python/usage.py", line 373, in <lambda>
    fn = lambda name, value, m=method: m(value)
  File "/opt/pyinstances/twisted/lib/python2.5/site-packages/twisted/web2/tap.py", line 137, in opt_mimetype
    self['root']._sharedContentTypes.update({ext: mimetype})
AttributeError: 'File' object has no attribute '_sharedContentTypes'

Change History (3)

comment:1 Changed 14 years ago by David Reid

(In [22700]) Tap test cases, fix some bugs involving indexes default value and mimetype.

Refs #3051, #2989

comment:2 Changed 11 years ago by <automation>

Owner: jknight deleted

comment:3 Changed 11 years ago by Jean-Paul Calderone

Resolution: wontfix
Status: newclosed

Since #4821 is now resolved, there is no more twistd web2 command line tool, so this bug is no longer in code we have. The --mime-type option for twistd web works differently, and doesn't seem to have a similar issue, so the bug doesn't apply to Twisted Web either.

Note: See TracTickets for help on using tickets.