Modify

Opened 4 years ago

Last modified 3 years ago

#7442 new defect

[Patch] RuntimeError: No Content-Length header set

Reported by: jonas.lieb@… Owned by: mape
Priority: normal Component: TimeVisualizerPlugin
Severity: normal Keywords: HTTP header missing
Cc: mikko.rantalainen@…, hasienda Trac Release: 0.12

Description

I used the BurnDown macro, but instead of showing an SVG graph, it only shows a frame telling me that this RuntimeError occured.


Auto-generated ticket

How to Reproduce

While doing a GET operation on /tractimevisualizer, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'targetcomponent': u'BoBa'}

User agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8

System Information

Trac 0.12
Babel 0.9.5
Genshi 0.6
mod_python 3.3.1
Pygments 1.2.2
pysqlite 2.4.1
Python 2.6.5 (r265:79063, Apr 16 2010, 13:28:26)
[GCC 4.4.3]
pytz 2010b
setuptools 0.6
SQLite 3.6.22
Subversion 1.6.6 (r40053)
jQuery 1.4.2

Enabled Plugins

LightGreenTheme 0.1
timingandestimationplugin 0.9.4
TracThemeEngine 2.0.1
TracTimeVisualizerPlugin 0.6

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.6/dist-packages/TracTimeVisualizerPlugin-0.6-py2.6.egg/tractimevisualizerplugin/pluginwrapper.py", line 31, in process_request
    return impl.process_request(self, req)
  File "/usr/local/lib/python2.6/dist-packages/TracTimeVisualizerPlugin-0.6-py2.6.egg/tractimevisualizerplugin/impl.py", line 426, in process_request
    req.write(svg)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/trac/web/api.py", line 528, in write
    raise RuntimeError("No Content-Length header set")
RuntimeError: No Content-Length header set

Attachments (1)

contentlength.patch (1.3 KB) - added by insyte 4 years ago.
Patch to provide content-length header

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by anonymous

i've not tried this plugin ever with Trac 0.12.. looks like newer environments are mo strict about headers.. i dont have time to play with this atm, but basically the content is generated to string, so at the very end, the byte count could be just set to header. iirc, trac had method which can be used to set different headers..

Changed 4 years ago by insyte

Patch to provide content-length header

comment:2 Changed 4 years ago by insyte

The contentlength patch I've attached seems to solve this problem.

comment:3 Changed 4 years ago by rjollos

  • Summary changed from RuntimeError: No Content-Length header set to [Patch] RuntimeError: No Content-Length header set

comment:4 Changed 4 years ago by Mikko Rantalainen <mikko.rantalainen@…>

  • Trac Release changed from 0.11 to 0.12

Tested with 0.12.1. The attached patch is indeed required to not cause runtime error. I've yet to see other than "No data" returned with 0.12.1 but at least no errors are raised anymore.

comment:5 Changed 4 years ago by anonymous

  • Cc mikko.rantalainen@… added; anonymous removed

comment:6 Changed 4 years ago by Mikko Rantalainen <mikko.rantalainen@…>

See patches at http://github.com/mikkorantalainen/timevisualizerplugin (mostly related to issue #8020)

Feel free to fork from there. There's a high probability that I personally won't modify this plugin any further.

comment:7 follow-up: Changed 4 years ago by rjollos

  • Cc hasienda added

I'd like to do some patching on this plugin over the weekend? Any objections?

I have global RW access to t-h.o, so I can proceed if given the go-ahead by the maintainer.

comment:8 Changed 4 years ago by hasienda

  • Keywords HTTP header missing added

Since I already re-used this patch for TracFormsPlugin with instant success, applying it here seems like a safe bet.

comment:9 in reply to: ↑ 7 Changed 3 years ago by mape

Replying to rjollos:

I have global RW access to t-h.o, so I can proceed if given the go-ahead by the maintainer.

Hey, go for it. I'm ok to get more contributors to the plugin. I've not been active for long time and I'm afraiding that I won't have time and opportunity to play with trac near soon.

Add Comment

Modify Ticket

Action
as new The owner will remain mape.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.