Le 20/03/2017 à 17:38, Eric Covener a écrit :
> On Mon, Mar 20, 2017 at 12:38 PM, Eric Covener <cove...@gmail.com> wrote:
>> On Mon, Mar 20, 2017 at 12:30 PM, DUVERGIER Claude
>> Are you getting mixed up by looking at the headers for unsuccessful
>> requests but not telling mod_headers to 'always' set the header?
>>
>> The optional condition argument determines which internal table of
>> responses headers this directive will operate against. Despite the
>> name, the default value of onsuccess does not limit an action to
>> responses with a 2xx status code. Headers set under this condition are
>> still used when, for example, a request is successfully proxied or
>> generated by CGI, even when they have generated a failing status code.
>>
> 
> http://httpd.apache.org/docs/2.4/mod/mod_headers.html#header
> 
> (submitted too early)
> 
> Location /foo should behave how you expect
> 
> 

During my tests, "always" condition didn't changed the results.

With:

    <Location "/foo">
        Header always set X-HeaderFooLoc "true"
    </Location>

(and no other Header nor <Location> directive in the config)
(Or with "onsuccess" condition instead)

I get the header when requesting the following URLs:
* .../foo/
* .../foo/qux/

But not for .../foo/non-existing/

Forgot to say: tests were performed on v2.2.22 (Debian 7) and v2.4.18
(Ubuntu 16.04).

-- 
DUVERGIER Claude

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to