Thanks, Dave. That was a very informative reply. I've analyzed the HTTP
headers generated by my browser when the form data is sent directly to the
script as well as the headers CF sends to the script when CFHTTP is called.
I tried "forwarding" the client's user agent variable over to the script but
that didn't work either. Is there anyway where we can override all the HTTP
headers generated by CF and replace that completely with the headers coming
from the client's browser? I suspect that using the <CFHTTPPARAM type="cgi">
tag/attribute set only adds to the headers rather than replaces them.
Leong
-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 20, 2000 1:02 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: CFHTTP and connection failures
> Does anyone know under what conditions the use of cfhttp
> returns "connection failure" as the value of cfhttp.filecontent?
>
> I tried submitting form data to a cgi script on a different
> server with the following code, and all I kept getting was a
> connection failure. When I get rid of the form data cfhttp
> connects normally and returns the default page when the cgi
> script is called without any form data being passed to it.
> Unfortunately I don't have access to the cgi script so I
> can't figure out what it does to the form data when it receives it.
>
> Here it is:
>
> <cfhttp url="http://www.somedomain.com/cgi-bin/script.pl"
> method="post" resolveurl="yes">
> <cfhttpparam type="FormField" name="login" value="#form.username#">
> <cfhttpparam type="FormField" name="password" value="#form.password#">
> </cfhttp>
>
> <cfoutput>#cfhttp.filecontent#</cfoutput>
There are a lot of potential problems you might have with CFHTTP. There are
a couple of approaches you can use to diagnose them.
1. If you're posting to a page, you're typically mimicking an existing HTML
form. Make sure you do exactly what that form is doing, since that form
provides exactly what the action page is expecting to receive. This includes
passing CGI variables that the action page expects, or cookies, or whatever.
For example, it may be the case that the action page is looking for either
IE or Netscape, and if you don't identify your CFHTTP request as one of
those, no response is provided.
2. Monitor the traffic. Use a proxy to record what the form sends, and what
the response headers are. There are many ways to do this; there's a utility
at http://www.coolfusion.com/ called HTTP Analyzer which provides some of
this functionality, but I prefer to use a recording proxy, like the Perl
script you can find at http://www.compansr.demon.co.uk/.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.