[thelist] CF: cookie versus cflocation?!?

Chris Evans chris at fuseware.com
Sat Sep 23 21:50:32 CDT 2000


>From what I understand, you are not supposed to send cookies in redirection
headers. It is technically possible, and done in most other languages, but
CF decided to follow the rules and don't allow cookies to be set during a
CFLOCATION.  It has been that way since CFLOCATION and CFCOOKIE were
introduced, and truly is a pain in the ass.

As an aside, I used to have the link to the spec that said no cookies in 302
headers ( or 301 I think?), but standards no one follows don't really
matter.  I have a standard that says everybody that comes to my house has to
bring beer, but so few people follow it.  And hardly anyone knows it is a
standard. sigh.

CFLOCATION/CFCOOKIE is a long time quirk of Cold Fusion.  I have a snippet I
use which is a mixture of JS and a meta refresh in case JS is disabled.  You
get in trouble, though, once you start using something like FuseBox that
uses a lot of includes.

Chris Evans
chris at fuseware.com
http://www.fuseware.com


-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Oliver Lineham
Sent: Saturday, September 23, 2000 7:09 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] CF: cookie versus cflocation?!?


At 23:21 22/09/00 -0700, you wrote:

>It seems like a sound idea to use a redirection because it eliminates that
>pesky resubmit dialog box that plagues users who refresh pages generated
>from a form submission.  But, the reason a cookie followed by a redirection
>fails to set the cookie is because the redirection wipes out the page
>header, which would normally include the cookies you wish to set.

Really?  It's certainly technically possible to do with HTTP, I've done it
with Perl and PHP.  Surely in CF you'd just have to make sure the
CFLOCATION comes after the cookie is set?

Yuck.

</ol>

____________________________________________________
     v i b e   m e d i a    http://www.vibe.co.nz/
  po box 10-492              wellington, new zealand
  phone +64 21 210-7845         oliver at lineham.co.nz

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !






More information about the thelist mailing list