Edgewall Software
Modify

Opened 17 years ago

Last modified 10 years ago

#5634 new defect

Request environment fragile and undocumented

Reported by: Dave Abrahams <dave@…> Owned by:
Priority: normal Milestone: unscheduled
Component: general Version: devel
Severity: normal Keywords: documentation
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It isn't clear how all those CGI variables are meant to be interpreted, which makes intervening and rearranging them a dicey business.

trachacks:changeset:2355 shows an example. You can ignore the fact that I'm using WSGI variables; even after #5586 is fixed the same problem will exist with the CGI variables.

Before that change it was working fine on the development server, but not on my fastcgi production server. The problem is that trac.web.main goes and reinstates trac.env_path unless you do something to make sure it's seen as present, yet still allows it to test as False in an if statement. That kind of subtlety is probably an implementation artifact, and even if stable, is unlikely to make it into the documentation unless explicit attention is paid.

Attachments (0)

Change History (6)

comment:1 by Noah Kantrowitz, 17 years ago

I still don't understand how this is not a duplicate of #5586. The protocol for using the CGI variables is clearly explained in all the install documents.

comment:2 by Dave Abrahams <dave@…>, 17 years ago

Sorry, which install documents, specifically? Maybe I missed something.

comment:3 by Remy Blank, 16 years ago

Keywords: documentation added
Milestone: 1.0

I assume this is a request for documentation of the CGI / WSGI variables used in Trac.

comment:4 by Dave Abrahams <dave@…>, 16 years ago

Yes, documentation, but also design changes to make their use less fragile. See [trachacks:changeset:2355 and note that this was my workaround for a bug in one of Noah's plugins. If Noah of all people can be so easily tripped up by a subtle issue, imagine an ordinary mortal trying to do this. At the very least, a careful description is needed of what you are/aren't allowed to count on from the request environment.

comment:5 by Christian Boos, 15 years ago

Milestone: 1.0unscheduled

Milestone 1.0 deleted

comment:6 by Ryan J Ollos, 10 years ago

Owner: Jonas Borgström removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.