Summary: | Parse error in ExtFilterDefine | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Sebastian Wolfgarten <sebastian.wolfgarten> |
Component: | mod_ext_filter | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | CLOSED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0.40 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Sebastian Wolfgarten
2002-08-17 18:04:28 UTC
Did you try ExtFilterDefine awk_line_numbering mode=output outtype=text/html cmd="/bin/awk '{print NR\\\": \\\" $N}'" In case the '\' escaping is eating the second double quote? If that's not the workaround, there is a bug in the parser. This indeed seems to be a bug. parse_cmd in mod_ext_filter.c does not process escaping characters. It sees the first " and scans till it finds the next ". No checks for escape chars. I'll have a fix shortly. If you need a line numbering ExtFilter urgently you can use pr without getting into escaping issues: ExtFilterDefine pr_line_numbering cmd="/usr/bin/pr -n -t" This was fixed earlier today (go Paul!). I just verified that this cmd= parameter yields a filter that prefixes the response with line numbers: cmd="/bin/awk '{print NR\": \" $N}'" To pick up the fix, you need a new modules/experimental/mod_ext_filter.c and a new srclib/apr/strings/apr_cpystrn.c. This will all be in the next release of Apache 2.0.x. Thanks for your report, and thanks for using Apache. |