Commit 23191b15 authored by deuce's avatar deuce
Browse files

Use the original request line, not the internal redirected request line

for the CGI REQUEST_URI variable.
parent cb41234d
......@@ -217,6 +217,7 @@ typedef struct {
char xjs_handler[MAX_PATH+1];
struct log_data *ld;
char request_line[MAX_REQUEST_LINE+1];
char orig_request_line[MAX_REQUEST_LINE+1];
BOOL finished; /* Done processing request. */
BOOL read_chunked;
BOOL write_chunked;
......@@ -784,7 +785,7 @@ static void init_enviro(http_session_t *session) {
if(!strcmp(session->host_name,session->host_ip))
add_env(session,"REMOTE_HOST",session->host_name);
add_env(session,"REMOTE_ADDR",session->host_ip);
add_env(session,"REQUEST_URI",session->req.request_line);
add_env(session,"REQUEST_URI",session->req.orig_request_line);
}
/*
......@@ -2854,6 +2855,8 @@ static char *get_request(http_session_t * session, char *req_line)
else
retval=NULL;
SAFECOPY(session->req.request_line,session->req.virtual_path);
if (!session->req.orig_request_line[0])
SAFECOPY(session->req.orig_request_line,session->req.virtual_path);
if(strtok_r(session->req.virtual_path,"?",&last))
query=strtok_r(NULL,"",&last);
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment