-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 12:25 PM
To: CF-Talk
Subject: RE: Is it really POST?
> Now, if you run the first page and submit it, whether you
> keep the FORM method as GET or change it to POST, the
> IsStruct() function will tell you that FORM is indeed a
> structure. This first led me to believe that even though the
> form was submitted by GET, CF still knew a form had been
> submitted. Now, even though I didn't check (bad), I surmise
> that the called page doesn't know a form has been submitted
> when method="GET" because if you run the second page on it's
> own, FORM is STILL a structure. I might be wrong about that,
> but I still have a solution that I think will work for you.
> Since the FORM structure exists on every page, and is empty
> on some, if you change the IsStruct() function to the
> StructIsEmpty() one, you will be able to tell if a form was
> submitted by GET and not post.
>
> I figured this was a good alternative method since HTTP
> headers can be faked.
> You're putting way too much thought into this. You can't fake the HTTP
> header for REQUEST_METHOD - whatever value you specify (GET, POST, HEAD,
> etc) is what you're doing. It's just like the URL you're actually requesting
> - if you "fake" the header specifying what you're "GETting", you'll get
> something else! So, just looking at the request method header is sufficient.
Actually I didn't put enough thought into that part! That was kind of dumb, I admit.
> If you have a FORM tag with a METHOD of GET, when the form is submitted,
> there's no way for the server to tell that the data came from a form - that
> data will be embedded into the query string.
Okay, so I guessed right on this one, just wasn't sure. Finding that the FORM
structure was available on all pages but just empty if there weren't any FORM
variables threw me off; I thought it was interesting :)
- Andy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists