I created a simple ColdFusion page to to display the HTTP headers, HTTP content, and value of a form/post argument.
------ post_to_me.cfm ------
<cfparam name="form.state" default="">
<cfoutput>
<cfdump var="#GetHTTPRequestData().headers#">
----- -----<br>
#GetHTTPRequestData().content#<br>
----- -----<br>
state = #form.state#<br>
----------------------------------
I tried three different methods of posting once just with a form in a web page, then with CURL, and finally with the @URL tag in Witango.
These are the responses I received for each post type:
Safari web page through html form.
<x-tad-smaller>struct</x-tad-smaller><x-tad-smaller>
</x-tad-smaller><x-tad-smaller>ACCEPT
*/*
ACCEPT-ENCODING
gzip, deflate;q=1.0, identity;q=0.5, *;q=0
ACCEPT-LANGUAGE
en, ja;q=0.92, ja-jp;q=0.96, fr;q=0.88, de-de;q=0.85, de;q=0.81, es;q=0.77, it-it;q=0.73, it;q=0.69, nl-nl;q=0.65, nl;q=0.62, sv-se;q=0.58, sv;q=0.54, no-no;q=0.50, no;q=0.46, da-dk;q=0.42, da;q=0.38, fi-fi;q=0.35, fi;q=0.31
CONNECTION
close
CONTENT-LENGTH
22
CONTENT-TYPE
application/x-www-form-urlencoded
COOKIE
CFID=4034; CFTOKEN=27864451; Witango_UserReference=0A275D063CA9A8E64030D627
HOST
www.mydomain.com
REFERER
http://www.mydomain.com/mvr/sendform.html
USER-AGENT
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125
</x-tad-smaller>----- -----
state=FL&Submit=Submit
----- -----
state = FL
CURL command curl.exe -d "state=FL" http://www.mydomain.com/post_to_me.cfm
<x-tad-smaller>ACCEPT
image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
CONTENT-LENGTH
8
CONTENT-TYPE
application/x-www-form-urlencoded
HOST
www.mydomain.com
PRAGMA
no-cache
USER-AGENT
curl/7.11.0 (win32) libcurl/7.11.0 zlib/1.1.4
</x-tad-smaller>----- -----
state=FL
----- -----
state = FL
@URL location="http://www.mydomain.com/post_to_me.cfm" postargs="state=FL"
<x-tad-smaller>struct</x-tad-smaller><x-tad-smaller>
</x-tad-smaller><x-tad-smaller>ACCEPT
*/*
CONTENT-LENGTH
8
HOST
www.mydomain.com
</x-tad-smaller>----- -----
state=FL
----- -----
state =
@URL doesn't pass as much header information, especially no the Content-Type header.
Is there a way to set extra header parameters besides from, and useragent? Or does anyone have any other ideas why @URL is not working?
Attached are the sample files
<<attachment: httppost.zip>>
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
