Microsoft KB Archive/827829

= BUG: The discard attribute may cause the cookie to be lost in Internet Explorer for Macintosh =

Article ID: 827829

Article Last Modified on 1/27/2004

-

APPLIES TO


 * Microsoft Internet Explorer 5.2 for Mac OS X

-





SYMPTOMS
If the server sends a cookie to the Microsoft Internet Explorer client and the discard attribute is sent at the end of the Set-Cookie header, the client will not save the cookie.



RESOLUTION
Do not to set the discard attribute at the end of the Set-Cookie header.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section of this article.



Steps to reproduce the behavior
  Create a page with the following code, name it Test.asp, and then put it in a virtual directory that is inside a server that is running Microsoft Internet Information Services (IIS): <% Response.AddHeader &quot;Set-Cookie&quot;, &quot;cookie1=oreo; domain=.microsoft.com; discard&quot; Response.AddHeader &quot;Set-Cookie&quot;, &quot;cookie2=vanilla wafers; discard; domain=.microsoft.com&quot; %>

<% Response.Write Time %> cookie1=<% Response.Write Request.Cookies(&quot;cookie1&quot;)%> cookie2=<% Response.Write Request.Cookies(&quot;cookie2&quot;)%>    Navigate to the page by using Internet Explorer for Macintosh. Click Submit, and then wait until the page refreshes.

Notice that the first cookie is not displayed. Only the second cookie is displayed. You cannot reproduce the behavior by using Microsoft Internet Explorer 6.0 for Windows.

Keywords: kbbug kbpending KB827829

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.