Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: trlacey - helmikuu 22, 2005, 05:00:14 AP

Otsikko: Blank Set-Cookie Header
Kirjoitti: trlacey - helmikuu 22, 2005, 05:00:14 AP
Hey Guys,

Is this intentional to send a blank Cookie in Display.php - Line 814?



   // Send the attachment headers.
   header('Pragma: ');
   header('Cache-Control: max-age=' . (525600 * 60) . ', private');
   if (!$context['browser']['is_gecko'])
      header('Content-Transfer-Encoding: binary');
   header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 525600 * 60) . ' GMT');
   header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($filename)) . ' GMT');
   header('Accept-Ranges: bytes');
   header('Set-Cookie:');
   header('Connection: close');
Otsikko: Re: Blank Set-Cookie Header
Kirjoitti: [Unknown] - helmikuu 22, 2005, 02:34:52 IP
Yes, it is.  This replaces the existing header and makes it possible for the browser to cache the attachments and avatars.

-[Unknown]
Otsikko: Re: Blank Set-Cookie Header
Kirjoitti: trlacey - helmikuu 22, 2005, 05:15:12 IP
Thanks.
Otsikko: Re: Blank Set-Cookie Header
Kirjoitti: trlacey - helmikuu 22, 2005, 10:06:14 IP
I've had this complaint quite often from members:

"In IE (what else?), if you preview a message containing a link to
an image and then try to post, you get a "you have already submitted
this post" error. Except the post hasn't been submitted at all."

This may be coincidence, but when I disable the Blank Cookie, it seems to fix the problem.  Maybe it's something I'm doing in my Webserver.

What do you think?
Otsikko: Re: Blank Set-Cookie Header
Kirjoitti: [Unknown] - helmikuu 23, 2005, 02:17:06 AP
I'm pretty sure that's a coincidence.

Are these members viewing your forum with more than one window at once?

-[Unknown]
Otsikko: Re: Blank Set-Cookie Header
Kirjoitti: trlacey - helmikuu 23, 2005, 07:20:49 AP
Thanks Unknown,

Some are using more than one flavour of Browser at the time.  Netscape, Firefox and IE.  The problems always seem to be with IE regarding Cookies.

I've re-enabled the Blank Cookie and the Error Message hasn't shown up again yet.