if directive not being respected in Apache 2.4.6

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

if directive not being respected in Apache 2.4.6

Day, Chuck

While trying to set a conditional parameter for the OpenIDC apache module, it seems the directive is not being respected at run-time. For example:

 

<If "'foo' == 'foo'">

       Define locale1 fr-FR

</If>

<Else>

       Define locale1 en-UK

</Else>

OIDCAuthRequestParams locale=${locale1}

 

 

The value of locale is set to en-UK. Have tried string match(i.e. -strmatch) with same results.

 

Anyone successfully using the if directive in Apache 2.4 for a similar use-case? Thank You.

This message has been marked as Medtronic Controlled

 

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records. To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser: http://emaildisclaimer.medtronic.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: if directive not being respected in Apache 2.4.6

Luca Toscano
Hi Chuck,

2017-06-09 18:36 GMT+02:00 Day, Chuck <[hidden email]>:

While trying to set a conditional parameter for the OpenIDC apache module, it seems the directive is not being respected at run-time. For example:

 

<If "'foo' == 'foo'">

       Define locale1 fr-FR

</If>

<Else>

       Define locale1 en-UK

</Else>

OIDCAuthRequestParams locale=${locale1}

 

 

The value of locale is set to en-UK. Have tried string match(i.e. -strmatch) with same results.

 

Anyone successfully using the if directive in Apache 2.4 for a similar use-case? Thank You.



not sure if you are still working on this issue but would it be possible for you to turn logs to trace8 (https://httpd.apache.org/docs/2.4/mod/core.html#loglevel) and verify what gets written in the error log? Moreover it would be interesting if you could check again with httpd 2.4.26.

Thanks!

Luca 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: if directive not being respected in Apache 2.4.6

Eric Covener
In reply to this post by Day, Chuck
On Fri, Jun 9, 2017 at 12:36 PM, Day, Chuck <[hidden email]> wrote:
>        Define locale1 fr-FR

It is not currently documented or rejected, but "Define" can't be
wrapped in any of the normal configuration sections (only ifdefine,
ifmodule, etc. can wrap it)
It is processed at startup only, not during request procesing.

--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: if directive not being respected in Apache 2.4.6

William A Rowe Jr
On Wed, Jun 21, 2017 at 10:39 AM, Eric Covener <[hidden email]> wrote:
> On Fri, Jun 9, 2017 at 12:36 PM, Day, Chuck <[hidden email]> wrote:
>>        Define locale1 fr-FR
>
> It is not currently documented or rejected, but "Define" can't be
> wrapped in any of the normal configuration sections (only ifdefine,
> ifmodule, etc. can wrap it)
> It is processed at startup only, not during request procesing.

Actually, it is documented, see last para;

http://httpd.apache.org/docs/2.4/mod/core.html#define

Frankly I'd think scope should be defined as Global only,
even though it won't error out in these other cases. For
trunk, it would be good to lock this down and eliminate
the legacy 'support' of Define in sections.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: if directive not being respected in Apache 2.4.6

Eric Covener
On Wed, Jun 21, 2017 at 11:45 AM, William A Rowe Jr <[hidden email]> wrote:

>> It is not currently documented or rejected, but "Define" can't be
>> wrapped in any of the normal configuration sections (only ifdefine,
>> ifmodule, etc. can wrap it)
>> It is processed at startup only, not during request procesing.
>
> Actually, it is documented, see last para;
>
> http://httpd.apache.org/docs/2.4/mod/core.html#define
>
> Frankly I'd think scope should be defined as Global only,
> even though it won't error out in these other cases. For
> trunk, it would be good to lock this down and eliminate
> the legacy 'support' of Define in sections.

You're right, I skimmed and missed it. Maybe it could use some kind of
note/warning box around it.

--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: if directive not being respected in Apache 2.4.6

Jacob Champion-2
In reply to this post by William A Rowe Jr
On 06/21/2017 08:45 AM, William A Rowe Jr wrote:
> Frankly I'd think scope should be defined as Global only,
> even though it won't error out in these other cases. For
> trunk, it would be good to lock this down and eliminate
> the legacy 'support' of Define in sections.

+1.

Very long-term, I think it would be good for all EXEC_ON_READ directives
to be distinguished by the config syntax itself. Similar to #include and
#define in C. I've been tinkering around with that a little in my spare
cycles.

--Jacob

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...