Thanks for the answer. Just wanted to reply to the list to close the thread.

Boy, do I feel stupid. I've used session variables so much in the
browser-related end of the application, I just totally went on auto-pilot. I
now realize what a goof I made in trying to use session variables for post
inputs. Thanks for not flaming me for this. Gee, I love this list.

John

-----Original Message-----
From: Jeffry Houser [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 1:40 PM
To: CF-Talk
Subject: Re: Sessions - Maybe a stupid question?


At 01:16 PM 01/28/2002 -0500, you wrote:
>I am setting up a portal with another server where that server submits an
>HTTP POST request to my application, I do a bunch of queries and send the
>results back in an XML output.
>
>My question is:
>If multiple users on the other end submit requests to my server and a
>request hits my server before the previous one is completed, will the
>session variables get all hosed up, since both requests came from the same
>server? Will the session variables set by the first request get overwritten
>by the second? Seems to me that two requests from the same server would
>share the cookie information (CFID and CFTOKEN).

  :hmm:  If you have one server accessing another, and you want each
request separate, I think you perhaps do not want (or need) session
variables, but let us explore this further.

  CFID and CFTOKEN are stored either as cookies, or must be passed in the
URL.  When Server1 (Requesting server) access Server2 (Host Server) this
happens:

  ColdFusion processes cfapplication tag.  It checks to see if the values,
CFID and CFTOKEN exist.  If they don't it creates them.

  Since you are using HTTP posts, there is no place where ColdFusion can
create cookies that are available beyond the scope of the current page, so
CFID and CFTOKEN automatically vanish after the page request is finished.

  CFID and CFTOKEN must be passed from template to template for each page
request.  I guess you could work something out where they get passed back
to server1, and appended to the url of it's second request.


>I know if I log into the application from two different browser windows, on
>the same machine, the session variables do get overwritten. Seems to me,
the
>same will happen with HTTP POSTs.

  Well, I'm not sure what you mean by session variables getting
over-written.  This all depends on your code.  Anyway, there is correlation
between two different browser windows (I.E. cookies, even if they are set
to expire on browser close) whereas two different http requests will not
have the correlation.

  Of course, if you want to keep all requests entirely separate, why do you
need session variables in the first place?




--
Jeffry Houser | mailto:[EMAIL PROTECTED]
AIM: Reboog711  | ICQ: 5246969 | Fax / Phone: 860-223-7946
--
Need a Web Developer?  Contact me!
My Book: Instant ColdFusion 5  | http://www.instantcoldfusion.com
My New Book: ColdFusion: A Beginner's Guide February 2002
--
Far Cry Fly, Alternative Folk Rock
http://www.farcryfly.com | http://www.mp3.com/FarCryFly

______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to