[thelist] HTTP/1.1 302 Found

Frank framar at interlog.com
Tue Jan 15 20:00:43 CST 2002


In answer to a question I posed earlier.


<tip type="Cold Fusion and HTTP" author="Frank Marion">

Question:

>I've got a form, using POST that when submitted, causes an HTTP 302 
>(Found). It presents me with a link to the same document that I 
>thought I was using.

>RFC 2616 <http://www.w3c.org/Protocols/rfc2616/rfc2616-sec10.html> tells me

>    "The requested resource resides temporarily under a
>    different URI. Since the redirection might be altered on
>    occasion, the client SHOULD continue to use the Request-URI
>    for future requests. Thsresponse is only cacheable if
>    indicated by Cache-Control or Expires header field."

>Can someone suggest what in practice might be causing this to occur?


Answer:

I posted a form to itself. If certain conditions were met, there 
would be an insert, then a CFLOCATION.

My form used the POST scope. CFLOCATION uses the GET scope. The 
server didn't know which to use, so did as it should, it presented me 
with an HTTP 302 Found message. The message includes a link to the 
page with the requested URL- in the scope of GET.

The solution is this: When the form uses POST, use CFHTTP to 
redirect. When the form uses GET, use CFLOCATION.


</tip>
-- 

Our best destiny, as planetary cohabitants, is the development
of what has been called "species consciousness" - something over
and above nationalisms, blocs, religions, ethnicities.


Frank Marion                      Framar Studios
frank at framarstudios.com           http://www.framarstudios.com




More information about the thelist mailing list