Changeset 2182
- Timestamp:
- 05/22/2008 10:04:01 AM (1 month ago)
- Files:
-
- branches/lighttpd-1.4.x/src/mod_fastcgi.c (modified) (6 diffs)
- branches/lighttpd-1.4.x/src/mod_scgi.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/lighttpd-1.4.x/src/mod_fastcgi.c
r2173 r2182 235 235 236 236 unsigned short break_scriptfilename_for_php; 237 238 /* 239 * workaround for program when prefix="/" 240 * 241 * rule to build PATH_INFO is hardcoded for when check_local is disabled 242 * enable this option to use the workaround 243 * 244 */ 245 246 unsigned short fix_root_path_name; 237 247 238 248 /* … … 1196 1206 { "strip-request-uri", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, /* 16 */ 1197 1207 { "kill-signal", NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION }, /* 17 */ 1208 { "fix-root-scriptname", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 18 */ 1198 1209 1199 1210 { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET } … … 1223 1234 host->allow_xsendfile = 0; /* handle X-LIGHTTPD-send-file */ 1224 1235 host->kill_signal = SIGTERM; 1236 host->fix_root_path_name = 0; 1225 1237 1226 1238 fcv[0].destination = host->host; … … 1244 1256 fcv[16].destination = host->strip_request_uri; 1245 1257 fcv[17].destination = &(host->kill_signal); 1258 fcv[18].destination = &(host->fix_root_path_name); 1246 1259 1247 1260 if (0 != config_insert_values_internal(srv, da_host->value, fcv)) { … … 3586 3599 * PATH_INFO = /bar 3587 3600 * 3601 * if prefix = /, and fix-root-path-name is enable 3602 * 3603 * /fcgi-bin/foo/bar 3604 * 3605 * SCRIPT_NAME = /fcgi-bin/foo 3606 * PATH_INFO = /bar 3607 * 3588 3608 */ 3589 3609 … … 3597 3617 3598 3618 con->uri.path->used -= con->request.pathinfo->used - 1; 3619 con->uri.path->ptr[con->uri.path->used - 1] = '\0'; 3620 } else if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') { 3621 buffer_copy_string(con->request.pathinfo, con->uri.path->ptr); 3622 con->uri.path->used = 1; 3599 3623 con->uri.path->ptr[con->uri.path->used - 1] = '\0'; 3600 3624 } branches/lighttpd-1.4.x/src/mod_scgi.c
r2173 r2182 203 203 */ 204 204 205 /* 206 * workaround for program when prefix="/" 207 * 208 * rule to build PATH_INFO is hardcoded for when check_local is disabled 209 * enable this option to use the workaround 210 * 211 */ 212 213 unsigned short fix_root_path_name; 205 214 ssize_t load; /* replace by host->load */ 206 215 … … 970 979 { "bin-environment", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION }, /* 11 */ 971 980 { "bin-copy-environment", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION }, /* 12 */ 981 { "fix-root-scriptname", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 13 */ 972 982 973 983 … … 992 1002 df->idle_timeout = 60; 993 1003 df->disable_time = 60; 1004 df->fix_root_path_name = 0; 994 1005 995 1006 fcv[0].destination = df->host; … … 1008 1019 fcv[11].destination = df->bin_env; 1009 1020 fcv[12].destination = df->bin_env_copy; 1021 fcv[13].destination = &(df->fix_root_path_name); 1010 1022 1011 1023 … … 2811 2823 2812 2824 con->uri.path->used -= con->request.pathinfo->used - 1; 2825 con->uri.path->ptr[con->uri.path->used - 1] = '\0'; 2826 } else if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') { 2827 buffer_copy_string(con->request.pathinfo, con->uri.path->ptr); 2828 con->uri.path->used = 1; 2813 2829 con->uri.path->ptr[con->uri.path->used - 1] = '\0'; 2814 2830 }

