Tk Library Source Code

View Ticket
Login
Ticket UUID: 464560
Title: ncgi::redirect request_uri
Type: Bug Version: None
Submitter: erolfe Created on: 2001-09-24 20:45:27
Subsystem: ncgi Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-10-23 10:44:45
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2001-10-23 03:44:45
Description:
In the ncgi::redirect procedure, a variable called 
request_uri is created, depending upon whether or not 
env(REQUEST_URI) exists.

Later in the procedure, env(REQUEST_URI) is used as 
part of a regexp evaluation, when instead, the 
request_uri variable should be used. The request_uri 
variable should be used because the env(REQUEST_URI) 
variable may not exist. (the source makes a comment 
w/regard to not all servers having the leading 
protocol spec...)

Thanks,
User Comments: andreas_kupries added on 2001-10-23 10:44:45:
Logged In: YES 
user_id=75003

Patch committed to head.

andreas_kupries added on 2001-10-21 07:24:30:

File Added - 12274: 464560_ncgi_redirect.diff

andreas_kupries added on 2001-10-21 07:24:29:
Logged In: YES 
user_id=75003

The simple approach to fix the bug proposed here is
incorrect. The variable "request_uri" does not contain the
same information as "env(REQUEST_URI)". Perform the change,
execute the testsuite and see testcase ncgi-11.2 fail.

The correct fix is to check again for the existence of
"env(REQUEST_URI)" and use "env(SERVER_NAME)" if it doesn't
(exist).

See attached the patch.

Attachments: