Skip to content

Commit ecc1b8f

Browse files
committed
don't pass args for SSI request
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1930161 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6393e62 commit ecc1b8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/generators/mod_cgid.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static char **create_argv(apr_pool_t *p, char *path, char *user, char *group,
239239
char *w;
240240
int idx = 0;
241241

242-
if (!(*args) || ap_strchr_c(args, '=')) {
242+
if (!args || !(*args) || ap_strchr_c(args, '=')) {
243243
numwords = 0;
244244
}
245245
else {
@@ -932,7 +932,10 @@ static int cgid_server(void *data)
932932
apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans);
933933
}
934934

935-
argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL, argv0, r->args);
935+
/* Do not pass args in case of SSI requests */
936+
argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL,
937+
argv0,
938+
cgid_req.req_type == SSI_REQ ? NULL : r->args);
936939

937940
/* We want to close sd2 for the new CGI process too.
938941
* If it is left open it'll make ap_pass_brigade() block

0 commit comments

Comments
 (0)