Re: Question about command parsing in mod_ext_filter.
On Mon, 19 Aug 2002, William A. Rowe, Jr. wrote: Don't we -already- have some argv parsing code in either proc.c or the mod_cgi that could be used for this purpose??? Let's make that exported, accessible code from apr itself. We already have it, and it is exported from APR. Look in strings/apr_cpystrn.c for apr_tokenize_to_argv. Ryan Bill At 03:31 PM 8/19/2002, Paul J. Reder wrote: After fixing the parse_cmd code to be able to handle escaped quotes (so that it would process the full /bin/awk '{print NR\: \ $N}' instead of just /bin/awk '{print NR\ (and then an error for the : \ $N}' part)) I ran into what appears to be the next problem. In parse_cmd it runs /* parms now has the command-line to parse */ while (filter-numArgs 30 strlen(filter-args[filter-numArgs] = ap_getword_white_nc(p, parms))) { ++filter-numArgs; } to break the command string into an args list of tokens. This code uses *only* white space as delimeters. Thus the input command string /bin/awk '{print NR\: \ $N}' gets broken into /bin/awk '{print NR\: \ $N}' The question I have is, shouldn't this break down into either /bin/awk '{print NR\: \ $N}' or /bin/awk '{print NR\ : \ $N}' The above listed pieces end up as the args list passed on the apr_proc_create call. Thanks, -- Paul J. Reder --- The strength of the Constitution lies entirely in the determination of each citizen to defend it. Only if every single citizen feels duty bound to do his share in this defense are the constitutional rights secure. -- Albert Einstein -- ___ Ryan Bloom [EMAIL PROTECTED] 550 Jean St Oakland CA 94610 ---
Re: Question about command parsing in mod_ext_filter.
Will do. [EMAIL PROTECTED] wrote: On Mon, 19 Aug 2002, William A. Rowe, Jr. wrote: Don't we -already- have some argv parsing code in either proc.c or the mod_cgi that could be used for this purpose??? Let's make that exported, accessible code from apr itself. We already have it, and it is exported from APR. Look in strings/apr_cpystrn.c for apr_tokenize_to_argv. Ryan Bill At 03:31 PM 8/19/2002, Paul J. Reder wrote: After fixing the parse_cmd code to be able to handle escaped quotes (so that it would process the full /bin/awk '{print NR\: \ $N}' instead of just /bin/awk '{print NR\ (and then an error for the : \ $N}' part)) I ran into what appears to be the next problem. In parse_cmd it runs /* parms now has the command-line to parse */ while (filter-numArgs 30 strlen(filter-args[filter-numArgs] = ap_getword_white_nc(p, parms))) { ++filter-numArgs; } to break the command string into an args list of tokens. This code uses *only* white space as delimeters. Thus the input command string /bin/awk '{print NR\: \ $N}' gets broken into /bin/awk '{print NR\: \ $N}' The question I have is, shouldn't this break down into either /bin/awk '{print NR\: \ $N}' or /bin/awk '{print NR\ : \ $N}' The above listed pieces end up as the args list passed on the apr_proc_create call. Thanks, -- Paul J. Reder --- The strength of the Constitution lies entirely in the determination of each citizen to defend it. Only if every single citizen feels duty bound to do his share in this defense are the constitutional rights secure. -- Albert Einstein -- Paul J. Reder --- The strength of the Constitution lies entirely in the determination of each citizen to defend it. Only if every single citizen feels duty bound to do his share in this defense are the constitutional rights secure. -- Albert Einstein