This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#249 closed defect (fixed)

Changing language without HTTP_REFERER

Reported by: vokac Owned by: pferreir
Priority: very low Milestone: v0.97.0
Component: General Version: 0.97.0
Keywords: HTTP_REFERER Cc:

Description

When browser doesn't send HTTP_REFERER, it leads to "Internal Server Error" - I would expect that it shows standard error page (preferable with explanation, why this error occured)

mod_python (pid=15771, interpreter='indicobeta.fjfi.cvut.cz', phase='PythonHandler?', handler='mod_python.publisher'): Application error
ServerName?: 'indicobeta.fjfi.cvut.cz'
DocumentRoot?: '/var/www/indicobeta/htdocs'
URI: '/indicobeta/changeLang.py'
Location: None
Directory: '/var/www/indicobeta/htdocs/'
Filename: '/var/www/indicobeta/htdocs/changeLang.py'
PathInfo?:
Traceback (most recent call last):

File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch?\n default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg)
File "/usr/lib64/python2.4/site-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg)
File "/usr/lib64/python2.4/site-packages/mod_python/publisher.py", line 213, in handler\n published = publish_object(req, object)
File "/usr/lib64/python2.4/site-packages/mod_python/publisher.py", line 425, in publish_object\n return publish_object(req,util.apply_fs_data(object, req.form, req=req))
File "/usr/lib64/python2.4/site-packages/mod_python/util.py", line 554, in apply_fs_data\n return object(args)
File "/var/www/indicobeta/htdocs/changeLang.py", line 3, in index\n argsREFERER_URL? = (str(req.headers_inReferer?))

KeyError?: 'Referer'

Attachments (1)

htdocs-http_referer.patch (1.0 KB) - added by vokac 6 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 follow-up: Changed 6 years ago by pferreir

  • Priority changed from normal to very low

comment:2 in reply to: ↑ 1 Changed 6 years ago by vokac

Replying to pferreir:

could you consider attached patch

Changed 6 years ago by vokac

comment:3 Changed 6 years ago by pferreir

  • Owner set to pferreir
  • Status changed from new to accepted

Defaulting to the baseURL seems pretty reasonable to me.
I will mark this for integration. Thanks.

comment:4 Changed 6 years ago by jose.pedro.ferreira@…

  • Resolution set to fixed
  • Status changed from accepted to closed

commit c6839d85e78b37552cb86afad697479ce96052f2
Author: Pedro Ferreira <jose.pedro.ferreira@…>
Date: Thu Mar 25 18:09:38 2010 +0100

[FIX] HTTP_REFERER for tz/lang switch


  • no longer mandatory
  • thanks vokac;
  • fixes #249;

comment:5 Changed 5 years ago by Pedro Ferreira <jose.pedro.ferreira@…>

In [c6839d85e78b37552cb86afad697479ce96052f2]:

[FIX] HTTP_REFERER for tz/lang switch

  • no longer mandatory
  • thanks vokac;
  • fixes #249;
Note: See TracTickets for help on using tickets.