You need to use the POSTARGS or POSTARGARRAY attribute of @URL

 

Excerpt from @URL Docs

 

“When the POSTARGS or POSTARGARRAY attribute is present, the type of

HTTP request issued by the <@URL> meta tag changes to POST from

GET”

 

 

Ben Johansen - http://www.pcforge.com
Authorized Witango & MDaemon Reseller
Available for Witango Developement

-----Original Message-----
From: Bryan Hughes [mailto:[EMAIL PROTECTED]
Sent: Monday, February 16, 2004 5:04 PM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: @URL problems

 

I'm trying to post information to a ColdFusion .cfm page using the @URL tag but for some reason the ColdFusion is not recognizing the HTTP content as POST arguments.

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.
struct

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

----- -----
state=FL&Submit=Submit
----- -----
state = FL


CURL command curl.exe -d "state=FL" http://www.mydomain.com/post_to_me.cfm

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

----- -----
state=FL
----- -----
state = FL


@URL location="http://www.mydomain.com/post_to_me.cfm" postargs="state=FL"
struct

ACCEPT
*/*

CONTENT-LENGTH
8

HOST
www.mydomain.com

----- -----
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

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to