#! /bin/sh /usr/share/dpatch/dpatch-run ## 055_mod_negotiation_typemaps by Jose Kahan ## ## All lines beginning with `## DP:' are a description of the patch. ### DP: mod_neg wasn't handling the query arguments to files ### DP: chosen thru a typemap @DPATCH@ --- apache2/modules/mappers/mod_negotiation.c 2007-10-04 13:16:08.000000000 +0200 +++ apache2/modules/mappers/mod_negotiation.c 2007-10-04 13:15:51.000000000 +0200 @@ -3132,7 +3132,28 @@ } /* now do a "fast redirect" ... promotes the sub_req into the main req */ - ap_internal_fast_redirect(sub_req, r); + { + /* save the previous parsed args and path_info */ + char *args; + char *path_info; + + if (r->args) { + args = apr_pstrdup(r->pool, r->args); + } else { + args = NULL; + } + + if (r->path_info) { + path_info = apr_pstrdup(r->pool, r->path_info); + } else { + path_info = NULL; + } + ap_internal_fast_redirect(sub_req, r); + + /* restore the parsed args and path info */ + r->args = args; + r->path_info = path_info; + } /* give no advise for time on this subrequest. Perhaps we * should tally the last mtime amoung all variants, and date