Loading modules/mappers/mod_dir.c +16 −13 Changes for modules/mappers/mod_dir.c: 16 added lines, 13 removed lines. Original line number Diff line number Diff line Loading @@ -99,8 +99,7 @@ static const command_rec dir_cmds[] = static void *create_dir_config(apr_pool_t *p, char *dummy) { dir_config_rec *new = (dir_config_rec *) apr_pcalloc(p, sizeof(dir_config_rec)); dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec)); new->index_names = NULL; return (void *) new; Loading @@ -108,7 +107,7 @@ static void *create_dir_config(apr_pool_t *p, char *dummy) static void *merge_dir_configs(apr_pool_t *p, void *basev, void *addv) { dir_config_rec *new = (dir_config_rec *) apr_pcalloc(p, sizeof(dir_config_rec)); dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec)); dir_config_rec *base = (dir_config_rec *)basev; dir_config_rec *add = (dir_config_rec *)addv; Loading @@ -134,7 +133,7 @@ static int fixup_dir(request_rec *r) r->handler = DIR_MAGIC_TYPE; } /* Never tollerate path_info on dir requests */ /* Never tolerate path_info on dir requests */ if (r->path_info && *r->path_info) { return DECLINED; } Loading @@ -148,17 +147,19 @@ static int fixup_dir(request_rec *r) * that this browser cannot handle redirs on non-GET requests * (such as Microsoft's WebFolders). */ if (r->method_number != M_GET if ((r->method_number != M_GET) && apr_table_get(r->subprocess_env, "redirect-carefully")) { return DECLINED; } if (r->args != NULL) if (r->args != NULL) { ifile = apr_pstrcat(r->pool, ap_escape_uri(r->pool, r->uri), "/", "?", r->args, NULL); else } else { ifile = apr_pstrcat(r->pool, ap_escape_uri(r->pool, r->uri), "/", NULL); } apr_table_setn(r->headers_out, "Location", ap_construct_url(r->pool, ifile, r)); Loading Loading @@ -193,8 +194,9 @@ static int fixup_dir(request_rec *r) * determine if name_ptr is our viable index, and therefore set them * up correctly on redirect. */ if (r->args != NULL) if (r->args != NULL) { name_ptr = apr_pstrcat(r->pool, name_ptr, "?", r->args, NULL); } rr = ap_sub_req_lookup_uri(name_ptr, r, NULL); Loading @@ -206,9 +208,9 @@ static int fixup_dir(request_rec *r) /* If the request returned a redirect, propagate it to the client */ if (ap_is_HTTP_REDIRECT(rr->status) || (rr->status == HTTP_NOT_ACCEPTABLE && num_names == 1) || (rr->status == HTTP_UNAUTHORIZED && num_names == 1)) { if (ap_is_HTTP_REDIRECT(rr->status) || (rr->status == HTTP_NOT_ACCEPTABLE && num_names == 1) || (rr->status == HTTP_UNAUTHORIZED && num_names == 1)) { apr_pool_join(r->pool, rr->pool); error_notfound = rr->status; Loading @@ -229,8 +231,10 @@ static int fixup_dir(request_rec *r) * exist, we return the last error response we got, instead * of a directory listing. */ if (rr->status && rr->status != HTTP_NOT_FOUND && rr->status != HTTP_OK) if (rr->status && rr->status != HTTP_NOT_FOUND && rr->status != HTTP_OK) { error_notfound = rr->status; } ap_destroy_sub_req(rr); } Loading @@ -240,7 +244,6 @@ static int fixup_dir(request_rec *r) } /* nothing for us to do, pass on through */ return DECLINED; } Loading Loading
modules/mappers/mod_dir.c +16 −13 Changes for modules/mappers/mod_dir.c: 16 added lines, 13 removed lines. Original line number Diff line number Diff line Loading @@ -99,8 +99,7 @@ static const command_rec dir_cmds[] = static void *create_dir_config(apr_pool_t *p, char *dummy) { dir_config_rec *new = (dir_config_rec *) apr_pcalloc(p, sizeof(dir_config_rec)); dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec)); new->index_names = NULL; return (void *) new; Loading @@ -108,7 +107,7 @@ static void *create_dir_config(apr_pool_t *p, char *dummy) static void *merge_dir_configs(apr_pool_t *p, void *basev, void *addv) { dir_config_rec *new = (dir_config_rec *) apr_pcalloc(p, sizeof(dir_config_rec)); dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec)); dir_config_rec *base = (dir_config_rec *)basev; dir_config_rec *add = (dir_config_rec *)addv; Loading @@ -134,7 +133,7 @@ static int fixup_dir(request_rec *r) r->handler = DIR_MAGIC_TYPE; } /* Never tollerate path_info on dir requests */ /* Never tolerate path_info on dir requests */ if (r->path_info && *r->path_info) { return DECLINED; } Loading @@ -148,17 +147,19 @@ static int fixup_dir(request_rec *r) * that this browser cannot handle redirs on non-GET requests * (such as Microsoft's WebFolders). */ if (r->method_number != M_GET if ((r->method_number != M_GET) && apr_table_get(r->subprocess_env, "redirect-carefully")) { return DECLINED; } if (r->args != NULL) if (r->args != NULL) { ifile = apr_pstrcat(r->pool, ap_escape_uri(r->pool, r->uri), "/", "?", r->args, NULL); else } else { ifile = apr_pstrcat(r->pool, ap_escape_uri(r->pool, r->uri), "/", NULL); } apr_table_setn(r->headers_out, "Location", ap_construct_url(r->pool, ifile, r)); Loading Loading @@ -193,8 +194,9 @@ static int fixup_dir(request_rec *r) * determine if name_ptr is our viable index, and therefore set them * up correctly on redirect. */ if (r->args != NULL) if (r->args != NULL) { name_ptr = apr_pstrcat(r->pool, name_ptr, "?", r->args, NULL); } rr = ap_sub_req_lookup_uri(name_ptr, r, NULL); Loading @@ -206,9 +208,9 @@ static int fixup_dir(request_rec *r) /* If the request returned a redirect, propagate it to the client */ if (ap_is_HTTP_REDIRECT(rr->status) || (rr->status == HTTP_NOT_ACCEPTABLE && num_names == 1) || (rr->status == HTTP_UNAUTHORIZED && num_names == 1)) { if (ap_is_HTTP_REDIRECT(rr->status) || (rr->status == HTTP_NOT_ACCEPTABLE && num_names == 1) || (rr->status == HTTP_UNAUTHORIZED && num_names == 1)) { apr_pool_join(r->pool, rr->pool); error_notfound = rr->status; Loading @@ -229,8 +231,10 @@ static int fixup_dir(request_rec *r) * exist, we return the last error response we got, instead * of a directory listing. */ if (rr->status && rr->status != HTTP_NOT_FOUND && rr->status != HTTP_OK) if (rr->status && rr->status != HTTP_NOT_FOUND && rr->status != HTTP_OK) { error_notfound = rr->status; } ap_destroy_sub_req(rr); } Loading @@ -240,7 +244,6 @@ static int fixup_dir(request_rec *r) } /* nothing for us to do, pass on through */ return DECLINED; } Loading