Welcome! Log In Create A New Profile

Advanced

Other headers disappear after adding Set-Cookie header

August 16, 2010 07:57AM
Hi,

I have the following problem.

In a configuration with several locations, I am using
add_header Set-Cookie "name=value; domain=xyz.com; path=/";
and some other headers, like
add_header X-Info "Some information"

When the Set-Cookie header is added, all additional headers suddenly disappear. When the Set-Cookie add_header call is disabled, the additional headers appear as normal.

First I thought it might be a bug, but this behavior doesn't occur when I put this combination of headers in another location in another (simpler) server block. I also upgraded from 0.7.67 to 0.8.49 to see if that would make a difference, but it still happens.

Apparently there is something that drops the additional headers, but I have no idea what. I have disabled all other locations, disabled all other things (like expires), but without any effect.

The server block in which this happens is build up as follows:
- Capture of a variable from the URL;
- Rewrite of certain URLs to a static HTML page;
- Location to serve the static HTML pages, which includes the add_header call for Set-Cookie, to pass on the value from the captured variable in a cookie;
- Location to serve other static content (css, images, etc);
- Location to proxy to apache.

I hope someone knows why this happens, and if it should be considered a bug or not.

Thanks,

Raymond
Subject Author Posted

Other headers disappear after adding Set-Cookie header

Unimatrix02 August 16, 2010 07:57AM

Re: Other headers disappear after adding Set-Cookie header

Maxim Dounin August 16, 2010 08:24AM

Re: Other headers disappear after adding Set-Cookie header

Unimatrix02 August 16, 2010 09:22AM

Re: Other headers disappear after adding Set-Cookie header

Maxim Dounin August 16, 2010 10:34AM

Re: Other headers disappear after adding Set-Cookie header

Unimatrix02 August 16, 2010 10:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready