Skip to main content
Inspiring
November 20, 2007
Question

Issues with CFHTTP

  • November 20, 2007
  • 1 reply
  • 378 views
Hello all,

I am currently trying to update a script on a page. The site was accessible to CFHTTP as recently as a few months ago, but the site changed its login system and since then we have not been able to do this login.

Here is what I have found, I am hoping that someone will recognize this and let me know what their solutions were.
1. When I try to log into the site using cfhttp, I am redirected to a different page called "page not available".
2. When I login using my browser, I can access just fine, unless....
3. ...When I login with fiddler2 open, I get a bad certificate error, and the certificate says the issuer is: "DO_NOT_TRUST_fiddlerRoot"

Does anyone have any experience with this? All suggestions/solutions would be greatly appreciated.

William
This topic has been closed for replies.

1 reply

Inspiring
November 30, 2007
Just guessing here, but their site may be blocking/redirecting HTTP calls that don't appear to be browsers. So, with cfhttp, you can "pretend" you're a browser by passing in browser-like headers with something like the following:

<body>
Here I am on the posting page<br />
<CFHTTP url=" http://some_domain_here/form_ok.cfm" method="POST" resolveurl="yes" throwonerror="yes" redirect="yes">
<CFHTTPPARAM type="HEADER" name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)">
<CFHTTPPARAM type="HEADER" name="Connection" value="Keep-Alive">
<CFHTTPPARAM type="HEADER" name="Cache-Control" value="no-cache">
<CFHTTPPARAM type="FORMFIELD" name="test1" value="Hello">
<CFHTTPPARAM type="FORMFIELD" name="test2" value="World">
</CFHTTP>
</body>