Modify

Opened 3 years ago

#9273 new defect

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

Reported by: anonymous Owned by: takanorig
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)

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.