Hi,

We have a CGI application that returns extra headers back to IIS. In some
cases, such as setting cookies, there are multiple header lines returned
with the same header name. For example:

Set-Cookie: ...
Set-Cookie: ...

Under Vista, something is causing IIS to only pass the last encountered
header for each unique header name. This results in the client application
from never seeing all the headers.

This issue would not happen with previous versions of IIS.

Is this a bug or is there something our application is not doing correctly?

Thanks

Re: Vista - IIS and CGI header processing by Bernard

Bernard
Mon Jan 15 20:29:01 CST 2007

Try post this to www.iis.net.

--
Regards,
Bernard Cheah
http://www.iis.net/
http://www.iis-resources.com/
http://msmvps.com/blogs/bernard/


"Brian Ross" <brian.ross.x@rogers.com> wrote in message
news:uz0Lg$NOHHA.4928@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> We have a CGI application that returns extra headers back to IIS. In some
> cases, such as setting cookies, there are multiple header lines returned
> with the same header name. For example:
>
> Set-Cookie: ...
> Set-Cookie: ...
>
> Under Vista, something is causing IIS to only pass the last encountered
> header for each unique header name. This results in the client application
> from never seeing all the headers.
>
> This issue would not happen with previous versions of IIS.
>
> Is this a bug or is there something our application is not doing
> correctly?
>
> Thanks
>



Re: Vista - IIS and CGI header processing by David

David
Mon Jan 15 21:00:58 CST 2007

Make sure that your application is actually writing multiple
"Set-Cookie" response headers and not response entity.

If that is true, then this is most likely a bug with IIS7 on Vista.
Sounds like the CGI module is setting headers and not appending
duplicate headers.

You can probably turn on FREB tracing from IIS7 GUI to debug the CGI
module's behavior as well.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//


Brian Ross wrote:
> Hi,
>
> We have a CGI application that returns extra headers back to IIS. In some
> cases, such as setting cookies, there are multiple header lines returned
> with the same header name. For example:
>
> Set-Cookie: ...
> Set-Cookie: ...
>
> Under Vista, something is causing IIS to only pass the last encountered
> header for each unique header name. This results in the client application
> from never seeing all the headers.
>
> This issue would not happen with previous versions of IIS.
>
> Is this a bug or is there something our application is not doing correctly?
>
> Thanks


Re: Vista - IIS and CGI header processing by Brian

Brian
Tue Jan 16 21:30:29 CST 2007

Hi,

I am pretty sure the multiple headers are returned correctly but I am not
sure what you mean by response entity?

Also, what do you mean by FREB tracing? I searched MSDN/Microsoft and found
very little information on this term.

Thanks
Brian

"David Wang" <w3.4you@gmail.com> wrote in message
news:1168916457.983683.78780@11g2000cwr.googlegroups.com...
> Make sure that your application is actually writing multiple
> "Set-Cookie" response headers and not response entity.
>
> If that is true, then this is most likely a bug with IIS7 on Vista.
> Sounds like the CGI module is setting headers and not appending
> duplicate headers.
>
> You can probably turn on FREB tracing from IIS7 GUI to debug the CGI
> module's behavior as well.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
> Brian Ross wrote:
>> Hi,
>>
>> We have a CGI application that returns extra headers back to IIS. In some
>> cases, such as setting cookies, there are multiple header lines returned
>> with the same header name. For example:
>>
>> Set-Cookie: ...
>> Set-Cookie: ...
>>
>> Under Vista, something is causing IIS to only pass the last encountered
>> header for each unique header name. This results in the client
>> application
>> from never seeing all the headers.
>>
>> This issue would not happen with previous versions of IIS.
>>
>> Is this a bug or is there something our application is not doing
>> correctly?
>>
>> Thanks
>



Re: Vista - IIS and CGI header processing by Bernard

Bernard
Wed Jan 17 00:43:26 CST 2007

Failed Request Event Buffering
http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=969&p=1

--
Regards,
Bernard Cheah
http://www.iis.net/
http://www.iis-resources.com/
http://msmvps.com/blogs/bernard/


"Brian Ross" <brian.ross.x@rogers.com> wrote in message
news:OUvXVfeOHHA.992@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> I am pretty sure the multiple headers are returned correctly but I am not
> sure what you mean by response entity?
>
> Also, what do you mean by FREB tracing? I searched MSDN/Microsoft and
> found very little information on this term.
>
> Thanks
> Brian
>
> "David Wang" <w3.4you@gmail.com> wrote in message
> news:1168916457.983683.78780@11g2000cwr.googlegroups.com...
>> Make sure that your application is actually writing multiple
>> "Set-Cookie" response headers and not response entity.
>>
>> If that is true, then this is most likely a bug with IIS7 on Vista.
>> Sounds like the CGI module is setting headers and not appending
>> duplicate headers.
>>
>> You can probably turn on FREB tracing from IIS7 GUI to debug the CGI
>> module's behavior as well.
>>
>>
>> //David
>> http://w3-4u.blogspot.com
>> http://blogs.msdn.com/David.Wang
>> //
>>
>>
>> Brian Ross wrote:
>>> Hi,
>>>
>>> We have a CGI application that returns extra headers back to IIS. In
>>> some
>>> cases, such as setting cookies, there are multiple header lines returned
>>> with the same header name. For example:
>>>
>>> Set-Cookie: ...
>>> Set-Cookie: ...
>>>
>>> Under Vista, something is causing IIS to only pass the last encountered
>>> header for each unique header name. This results in the client
>>> application
>>> from never seeing all the headers.
>>>
>>> This issue would not happen with previous versions of IIS.
>>>
>>> Is this a bug or is there something our application is not doing
>>> correctly?
>>>
>>> Thanks
>>
>
>



Re: Vista - IIS and CGI header processing by David

David
Wed Jan 17 22:29:48 CST 2007

I want to verify that what your CGI sent as multiple Set-Cookie headers
is actually interpreted by the Browser as response headers (instead of
entity body). In other words, the data stream from the server to the
client has the multiple Set-Cookie headers showing up before the first
double \r\n in the HTTP response.

It doesn't matter if you're "pretty sure" about what you returned; if
what you sent is *after* the first double \r\n as read by the Browser,
then it is considered entity-body by the Browser and not processed as a
Set-Cookie directive. Which is the behavior that you are claiming is
different on Vista.

I am inclined to think this is a bug in the CGI module because I had
seen something similar in the IIS7 ISAPI Filter module. It's just
necessary to make it cleanly obvious and not "pretty sure".


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//



Brian Ross wrote:
> Hi,
>
> I am pretty sure the multiple headers are returned correctly but I am not
> sure what you mean by response entity?
>
> Also, what do you mean by FREB tracing? I searched MSDN/Microsoft and found
> very little information on this term.
>
> Thanks
> Brian
>
> "David Wang" <w3.4you@gmail.com> wrote in message
> news:1168916457.983683.78780@11g2000cwr.googlegroups.com...
> > Make sure that your application is actually writing multiple
> > "Set-Cookie" response headers and not response entity.
> >
> > If that is true, then this is most likely a bug with IIS7 on Vista.
> > Sounds like the CGI module is setting headers and not appending
> > duplicate headers.
> >
> > You can probably turn on FREB tracing from IIS7 GUI to debug the CGI
> > module's behavior as well.
> >
> >
> > //David
> > http://w3-4u.blogspot.com
> > http://blogs.msdn.com/David.Wang
> > //
> >
> >
> > Brian Ross wrote:
> >> Hi,
> >>
> >> We have a CGI application that returns extra headers back to IIS. In some
> >> cases, such as setting cookies, there are multiple header lines returned
> >> with the same header name. For example:
> >>
> >> Set-Cookie: ...
> >> Set-Cookie: ...
> >>
> >> Under Vista, something is causing IIS to only pass the last encountered
> >> header for each unique header name. This results in the client
> >> application
> >> from never seeing all the headers.
> >>
> >> This issue would not happen with previous versions of IIS.
> >>
> >> Is this a bug or is there something our application is not doing
> >> correctly?
> >>
> >> Thanks
> >


Re: Vista - IIS and CGI header processing by Brian

Brian
Thu Jan 18 15:45:38 CST 2007

Hi,

It must be sending the headers correctly because the last 'Set-Cookie'
header returned by the CGI is correctly being sent to the client browser.
The other Set-Cookie headers that are being dropped by IIS are set at the
exact same point by the CGI application. This isn't a case of the headers
simply being ignored because they are part of the HTTP response body.

It also looks like a bug to me but I wanted to make sure that there wasn't
some special processing that I wasn't aware of that might explain this
behaviour.

Thanks
Brian

"David Wang" <w3.4you@gmail.com> wrote in message
news:1169094588.537134.61280@a75g2000cwd.googlegroups.com...
>I want to verify that what your CGI sent as multiple Set-Cookie headers
> is actually interpreted by the Browser as response headers (instead of
> entity body). In other words, the data stream from the server to the
> client has the multiple Set-Cookie headers showing up before the first
> double \r\n in the HTTP response.
>
> It doesn't matter if you're "pretty sure" about what you returned; if
> what you sent is *after* the first double \r\n as read by the Browser,
> then it is considered entity-body by the Browser and not processed as a
> Set-Cookie directive. Which is the behavior that you are claiming is
> different on Vista.
>
> I am inclined to think this is a bug in the CGI module because I had
> seen something similar in the IIS7 ISAPI Filter module. It's just
> necessary to make it cleanly obvious and not "pretty sure".
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
> Brian Ross wrote:
>> Hi,
>>
>> I am pretty sure the multiple headers are returned correctly but I am not
>> sure what you mean by response entity?
>>
>> Also, what do you mean by FREB tracing? I searched MSDN/Microsoft and
>> found
>> very little information on this term.
>>
>> Thanks
>> Brian
>>
>> "David Wang" <w3.4you@gmail.com> wrote in message
>> news:1168916457.983683.78780@11g2000cwr.googlegroups.com...
>> > Make sure that your application is actually writing multiple
>> > "Set-Cookie" response headers and not response entity.
>> >
>> > If that is true, then this is most likely a bug with IIS7 on Vista.
>> > Sounds like the CGI module is setting headers and not appending
>> > duplicate headers.
>> >
>> > You can probably turn on FREB tracing from IIS7 GUI to debug the CGI
>> > module's behavior as well.
>> >
>> >
>> > //David
>> > http://w3-4u.blogspot.com
>> > http://blogs.msdn.com/David.Wang
>> > //
>> >
>> >
>> > Brian Ross wrote:
>> >> Hi,
>> >>
>> >> We have a CGI application that returns extra headers back to IIS. In
>> >> some
>> >> cases, such as setting cookies, there are multiple header lines
>> >> returned
>> >> with the same header name. For example:
>> >>
>> >> Set-Cookie: ...
>> >> Set-Cookie: ...
>> >>
>> >> Under Vista, something is causing IIS to only pass the last
>> >> encountered
>> >> header for each unique header name. This results in the client
>> >> application
>> >> from never seeing all the headers.
>> >>
>> >> This issue would not happen with previous versions of IIS.
>> >>
>> >> Is this a bug or is there something our application is not doing
>> >> correctly?
>> >>
>> >> Thanks
>> >
>



Re: Vista - IIS and CGI header processing by Wade

Wade
Thu Jan 18 16:37:53 CST 2007

Hello,

Pardon my jumping in here, but this a bug in IIS 7 and we are aware of it.

There is no fix currently available. If you would like to push for one, the
best course of action is to contact Product Support Services and request a
fix. I can't make any comments as to when something could be available.
Product Support would work with you on the details.

If it helps, you may give the Support Engineer my name so that they don't
need to do any special investigation.

Thank you,
-Wade A. Hilmo,
-Microsoft


"Brian Ross" <brian.ross.x@rogers.com> wrote in message
news:edP$Do0OHHA.1248@TK2MSFTNGP03.phx.gbl...
> Hi,
>
> It must be sending the headers correctly because the last 'Set-Cookie'
> header returned by the CGI is correctly being sent to the client browser.
> The other Set-Cookie headers that are being dropped by IIS are set at the
> exact same point by the CGI application. This isn't a case of the headers
> simply being ignored because they are part of the HTTP response body.
>
> It also looks like a bug to me but I wanted to make sure that there wasn't
> some special processing that I wasn't aware of that might explain this
> behaviour.
>
> Thanks
> Brian
>
> "David Wang" <w3.4you@gmail.com> wrote in message
> news:1169094588.537134.61280@a75g2000cwd.googlegroups.com...
> >I want to verify that what your CGI sent as multiple Set-Cookie headers
> > is actually interpreted by the Browser as response headers (instead of
> > entity body). In other words, the data stream from the server to the
> > client has the multiple Set-Cookie headers showing up before the first
> > double \r\n in the HTTP response.
> >
> > It doesn't matter if you're "pretty sure" about what you returned; if
> > what you sent is *after* the first double \r\n as read by the Browser,
> > then it is considered entity-body by the Browser and not processed as a
> > Set-Cookie directive. Which is the behavior that you are claiming is
> > different on Vista.
> >
> > I am inclined to think this is a bug in the CGI module because I had
> > seen something similar in the IIS7 ISAPI Filter module. It's just
> > necessary to make it cleanly obvious and not "pretty sure".
> >
> >
> > //David
> > http://w3-4u.blogspot.com
> > http://blogs.msdn.com/David.Wang
> > //
> >
> >
> >
> > Brian Ross wrote:
> >> Hi,
> >>
> >> I am pretty sure the multiple headers are returned correctly but I am
not
> >> sure what you mean by response entity?
> >>
> >> Also, what do you mean by FREB tracing? I searched MSDN/Microsoft and
> >> found
> >> very little information on this term.
> >>
> >> Thanks
> >> Brian
> >>
> >> "David Wang" <w3.4you@gmail.com> wrote in message
> >> news:1168916457.983683.78780@11g2000cwr.googlegroups.com...
> >> > Make sure that your application is actually writing multiple
> >> > "Set-Cookie" response headers and not response entity.
> >> >
> >> > If that is true, then this is most likely a bug with IIS7 on Vista.
> >> > Sounds like the CGI module is setting headers and not appending
> >> > duplicate headers.
> >> >
> >> > You can probably turn on FREB tracing from IIS7 GUI to debug the CGI
> >> > module's behavior as well.
> >> >
> >> >
> >> > //David
> >> > http://w3-4u.blogspot.com
> >> > http://blogs.msdn.com/David.Wang
> >> > //
> >> >
> >> >
> >> > Brian Ross wrote:
> >> >> Hi,
> >> >>
> >> >> We have a CGI application that returns extra headers back to IIS. In
> >> >> some
> >> >> cases, such as setting cookies, there are multiple header lines
> >> >> returned
> >> >> with the same header name. For example:
> >> >>
> >> >> Set-Cookie: ...
> >> >> Set-Cookie: ...
> >> >>
> >> >> Under Vista, something is causing IIS to only pass the last
> >> >> encountered
> >> >> header for each unique header name. This results in the client
> >> >> application
> >> >> from never seeing all the headers.
> >> >>
> >> >> This issue would not happen with previous versions of IIS.
> >> >>
> >> >> Is this a bug or is there something our application is not doing
> >> >> correctly?
> >> >>
> >> >> Thanks
> >> >
> >
>
>



Re: Vista - IIS and CGI header processing by David

David
Fri Jan 19 05:39:07 CST 2007

Yup, then that sounds like a bug in the CGI Module to me. Cookies have
no special meaning to IIS. It's just another header to pass back and
forth.

Cookies can have meaning to application layers on TOP of IIS, such as
ASP, PHP, ASP.Net, etc which can use its special client-side
interpretation to manage state and "sessions".


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//


Brian Ross wrote:
> Hi,
>
> It must be sending the headers correctly because the last 'Set-Cookie'
> header returned by the CGI is correctly being sent to the client browser.
> The other Set-Cookie headers that are being dropped by IIS are set at the
> exact same point by the CGI application. This isn't a case of the headers
> simply being ignored because they are part of the HTTP response body.
>
> It also looks like a bug to me but I wanted to make sure that there wasn't
> some special processing that I wasn't aware of that might explain this
> behaviour.
>
> Thanks
> Brian
>
> "David Wang" <w3.4you@gmail.com> wrote in message
> news:1169094588.537134.61280@a75g2000cwd.googlegroups.com...
> >I want to verify that what your CGI sent as multiple Set-Cookie headers
> > is actually interpreted by the Browser as response headers (instead of
> > entity body). In other words, the data stream from the server to the
> > client has the multiple Set-Cookie headers showing up before the first
> > double \r\n in the HTTP response.
> >
> > It doesn't matter if you're "pretty sure" about what you returned; if
> > what you sent is *after* the first double \r\n as read by the Browser,
> > then it is considered entity-body by the Browser and not processed as a
> > Set-Cookie directive. Which is the behavior that you are claiming is
> > different on Vista.
> >
> > I am inclined to think this is a bug in the CGI module because I had
> > seen something similar in the IIS7 ISAPI Filter module. It's just
> > necessary to make it cleanly obvious and not "pretty sure".
> >
> >
> > //David
> > http://w3-4u.blogspot.com
> > http://blogs.msdn.com/David.Wang
> > //
> >
> >
> >
> > Brian Ross wrote:
> >> Hi,
> >>
> >> I am pretty sure the multiple headers are returned correctly but I am not
> >> sure what you mean by response entity?
> >>
> >> Also, what do you mean by FREB tracing? I searched MSDN/Microsoft and
> >> found
> >> very little information on this term.
> >>
> >> Thanks
> >> Brian
> >>
> >> "David Wang" <w3.4you@gmail.com> wrote in message
> >> news:1168916457.983683.78780@11g2000cwr.googlegroups.com...
> >> > Make sure that your application is actually writing multiple
> >> > "Set-Cookie" response headers and not response entity.
> >> >
> >> > If that is true, then this is most likely a bug with IIS7 on Vista.
> >> > Sounds like the CGI module is setting headers and not appending
> >> > duplicate headers.
> >> >
> >> > You can probably turn on FREB tracing from IIS7 GUI to debug the CGI
> >> > module's behavior as well.
> >> >
> >> >
> >> > //David
> >> > http://w3-4u.blogspot.com
> >> > http://blogs.msdn.com/David.Wang
> >> > //
> >> >
> >> >
> >> > Brian Ross wrote:
> >> >> Hi,
> >> >>
> >> >> We have a CGI application that returns extra headers back to IIS. In
> >> >> some
> >> >> cases, such as setting cookies, there are multiple header lines
> >> >> returned
> >> >> with the same header name. For example:
> >> >>
> >> >> Set-Cookie: ...
> >> >> Set-Cookie: ...
> >> >>
> >> >> Under Vista, something is causing IIS to only pass the last
> >> >> encountered
> >> >> header for each unique header name. This results in the client
> >> >> application
> >> >> from never seeing all the headers.
> >> >>
> >> >> This issue would not happen with previous versions of IIS.
> >> >>
> >> >> Is this a bug or is there something our application is not doing
> >> >> correctly?
> >> >>
> >> >> Thanks
> >> >
> >