Modify

Opened 13 years ago

#9273 new defect

trac return 500 error when the request has no Accept-Language header

Reported by: anonymous Owned by: Takanori Suzuki
Priority: normal Component: TicketExtPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

While using curl/wget to GET /ticket/xxxx, Trac return 500 error like below.This issue can be fixed by adding an "Accept-Language" header to the command.

ticketext version: r10092

command: curl http://myhost/ticket/xxxx

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 248, in dispatch
    self._post_process_request(req, *resp)
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 357, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File "/usr/lib/python2.6/site-packages/ticketext/template.py", line 42, in post_process_request
    locale = LocaleUtil().get_locale(req)
  File "/usr/lib/python2.6/site-packages/ticketext/api.py", line 22, in get_locale
    if (len(locale_array) > 0):
TypeError: object of type 'NoneType' has no len()

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Takanori Suzuki.

Add Comment


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

 
Note: See TracTickets for help on using tickets.