On 15/04/2019 22.39, Ervin Hegedüs wrote:
Hi,

I'm playing with a module, and found an interesting function.

Example:

const command_rec module_directives[] = {
    ...
     AP_INIT_TAKE23 (
         "DirectiveCmd",
         cmd,
         NULL,
         CMD_SCOPE_ANY,
         "Directive Command"
     ),

...
extern const command_rec module_directives[];

module AP_MODULE_DECLARE_DATA foo_module = {
     STANDARD20_MODULE_STUFF,
     create_directory_config,
     merge_directory_configs,
     NULL,
     NULL,
     module_directives,
     register_hooks
};

And now if there is a command directive in the config, eg:

DirectiveCmd Arg1 "Arg2 re(\\\\foo)"

then I'll got the unescaped form of 2nd argument: "Arg2 re(\\foo)" (and of
course, it looks like all argument will unsescaped).

(It's new for me, because so far I've always used the "raw" stream reader
functions (eg. fread()) - nevermind :).)

Could anybody helps me please, which function parses the config file, and
make this unescaped formula (inside of Apache API)?

Hello,

The function that extracts words from a line of text is ap_getword_conf declared in httpd.h.

It is called from ap_build_config declared in http_config.h.

The root of the call-chain is ap_read_config delared in http_config.h.

Best regards,
Sorin

Reply via email to