Skip to content

Commit 68f77c0

Browse files
committed
Update the documentroot in handler_cgi_base.
When the user has set a different Document Root in the admin, it seems appropriate to propagate this change to the CGI subsystem handling the request.
1 parent 2549350 commit 68f77c0

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

cherokee/handler_cgi_base.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,9 @@ cherokee_handler_cgi_base_build_basic_env (
294294

295295
/* Document Root:
296296
*/
297-
if (CONN_VSRV(conn)->evhost) {
298-
set_env (cgi, "DOCUMENT_ROOT",
297+
set_env (cgi, "DOCUMENT_ROOT",
299298
conn->local_directory.buf,
300299
conn->local_directory.len);
301-
} else {
302-
set_env (cgi, "DOCUMENT_ROOT",
303-
CONN_VSRV(conn)->root.buf,
304-
CONN_VSRV(conn)->root.len);
305-
}
306300

307301
/* REMOTE_(ADDR/PORT): X-Real-IP
308302
*/

0 commit comments

Comments
 (0)