Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

#9563 closed defect (fixed)

ImageCaptcha doesn't set content length in SpamFilter plugin

Reported by: kmilner@… Owned by: Dirk Stöcker
Priority: normal Milestone: plugin - spam-filter
Component: plugin/spamfilter Version: 0.13dev
Severity: normal Keywords: content length
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I am using Trac-0.13dev_r9995 with TracSpamFilter-0.3.3dev_r9994. When enabling ImageCaptcha, I get the following error on challenge pages:

Trac detected an internal error: RuntimeError: No Content-Length header set

Here is the stack trace:

2010-08-12 12:45:54,432 Trac[main] ERROR: Internal Server Error: 
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/TracSpamFilter-0.3.3dev_r9994-py2.5.egg/tracspamfilter/captcha/image.py", line 72, in process_request
    req.write(image.getvalue())
  File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 528, in write
    raise RuntimeError("No Content-Length header set")
RuntimeError: No Content-Length header set

I believe that a change needs to be made here to add the content length field: plugins/0.12/spam-filter-captcha/tracspamfilter/captcha/image.py@9994#L62

I'll have to revert to expression captcha in the meantime.

Thanks!

Attachments (0)

Change History (1)

comment:1 by Dirk Stöcker, 14 years ago

Resolution: fixed
Status: newclosed

In r10070.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Dirk Stöcker.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Dirk Stöcker 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.