Opened 17 years ago
Last modified 10 years ago
#5634 new defect
Request environment fragile and undocumented
Reported by: | 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 , 17 years ago
comment:3 by , 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 , 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:6 by , 10 years ago
Owner: | removed |
---|
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.