ColdFusion CFHTTP Post makes a second GET request right after

I am using ColdFusion 8.

I am making a CFHTTP message on a remote server. The remote site looked at their logs, and they say that my code does POST and then immediately executes the second GET request.

Here is my code (URL has been changed):

<cfhttp url="https://www.theurlofthesite.com" method="POST" port="443" resolveurl="yes" redirect="yes">
<cfhttpparam type="FORMFIELD" name="type" value="SALES">
<cfhttpparam type="FORMFIELD" name="account" value="10003">
<cfhttpparam type="FORMFIELD" name="Submit" value="Submit+Request">
</cfhttp>

<Cfoutput>#cfhttp.fileContent#</CFOUTPUT>

<cfdump var="#cfhttp#">

Does anyone know why they see the second GET request right after my POST? it destroys the session and does not save the page correctly because of this (we think)

I definitely don't do GET, I only do one POST.

thanks,

Rich

+3
source share
5 answers

, CF 5, GET. POST, CF 8.

0

, , GET, , CFOUTPUT , , - , GET.

, CFHTTP . , CFHTTP . CFHTTP , CFID/CFTOKEN CFHTTPPARAM . .

+5
redirect="false" //maybe?

... ...

ColdFusion 300- () , , URL-, .

0
source

If you are using firefox, make sure firebug and ySlow are disabled for your request. They run your URLs twice to set up their data, and can be a real problem when you don't know what they are doing.

Also try disabling redirection if you do not need it.

0
source

Is this code inside a custom CF tag? If so, the challenge

<mytag>...</mytag>

or

<mytag />

Invokes a custom TWICE tag! (Once for the start tag and once for completion.)

-1
source

Source: https://habr.com/ru/post/1709719/


All Articles