From modules-dev-return-5236-archive-asf-public=cust-asf.ponee.io@httpd.apache.org Tue Apr 16 08:21:21 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 228C118064C for ; Tue, 16 Apr 2019 10:21:21 +0200 (CEST) Received: (qmail 80198 invoked by uid 500); 16 Apr 2019 08:21:19 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 80184 invoked by uid 99); 16 Apr 2019 08:21:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2019 08:21:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3835DC6045 for ; Tue, 16 Apr 2019 08:21:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.207 X-Spam-Level: X-Spam-Status: No, score=-0.207 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.006, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id OcCjEQ8iyfjU for ; Tue, 16 Apr 2019 08:21:17 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B382E5FDBC for ; Tue, 16 Apr 2019 08:21:16 +0000 (UTC) Received: by mail-wm1-f47.google.com with SMTP id 4so24130505wmf.1 for ; Tue, 16 Apr 2019 01:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=HoGrECUTBpTbTaExI5BviW1SflEnRVMWeTkbqzSKpHU=; b=AuYFgtffi1KoL2wMkqRs8Gw59abMa5ZMiACLsGE48NWuZAWpg9UGjvsmtjBIIecKMe NJ2wcE8u6QFDGZfNxTBglb1V14oGPiDeWzcl9wxiiWy7PvtRTNxcqG/ZFynJKqTS0v6i NqApfH+ZAvl84O/cLnH8tzKxwEAsEeRo5rXk4GRAw2TEAD4ijfRH/A7ceYHkTdS5Db9X 3PSk1fBKg9rpYSNEu2oQN+wePSol6QuHxq/Csi8M0ycSSS0wanOBKdNUtrs+do/gDk9o gfwxbMS5AShrrNhyX9aDQzeMmikO+MkV+7qdSnk7PUQLMcmZoR8+fLeESmAT1SXpHj8C mPNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HoGrECUTBpTbTaExI5BviW1SflEnRVMWeTkbqzSKpHU=; b=Anc+UCMaP93CLyk9gmWRU4PkIQ/r8yiLKVzJcI0EvNK9L6sjVw4voEnJFOawxKsY+N 7x2O/QsnOjQy/WUdZadz+WKQOwxLS+msFeWjd/xg4ukFGlb6ek04GxWu3IZC3pwfC+6J nXVUsjLmrqn5xmb+tjS9gvziHW3YsdmQWPyYsK4GG4NAmNnStbNBhPD73rsJSgYzwb3P 4kvdebBVijpOgEJ9W6GDQiY2SIqN9CUUlQ7hKEvSi1ZLAVp99pIa6NGrqLyhZspqSJ/g /hlaYYUvITg3Wb6QROvn4tvEaGB5B/TczYqPqTRkJ9AXx/U2HhT5VsH/9cyA4+U596Bp WHMQ== X-Gm-Message-State: APjAAAVzd+HdAjzTME4J7z4zqJniVq4JO3Xtur+/g8nv1VC6ep0p5OKX 4F8yq1QHeYj+eVKDHffh2dRCXqTp X-Google-Smtp-Source: APXvYqyPkp9xPPWm2TbfCeMOyNUDU3x4WyFwf9sPzgwliGfydzUpfTUHL7D2CyjbAZED81IPNOjnkQ== X-Received: by 2002:a1c:7918:: with SMTP id l24mr26631835wme.29.1555402869485; Tue, 16 Apr 2019 01:21:09 -0700 (PDT) Received: from [10.8.0.2] ([193.252.149.222]) by smtp.googlemail.com with ESMTPSA id m6sm67919743wrr.53.2019.04.16.01.21.06 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 01:21:06 -0700 (PDT) Subject: Re: Modul command directive arguments To: modules-dev@httpd.apache.org References: From: Sorin Manolache Message-ID: Date: Tue, 16 Apr 2019 10:21:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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