-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

One thing that immediately jumps out at me is your POST line.  HTTP
spec doesn't include the entire URL in the POST, only the path info. 
So this:
  POST http://xyz.xyz.com/1.cfm HTTP/1.0
should actually be:
  POST /1.cfm HTTP/1.0
  Host: xyz.xyz.com

You can include the hostname in a host header if need be (depending
on how your server is setup, that might be required).  The POST
should only include the path, tho.

Other possible gotchas: 

There's no Content-Type header in your request.  Try adding:
Content-type: application/x-www-form-urlencoded

Your POST data isn't URL encoded.  For the body of your HTTP request,
try:
date_id=2000%2D09%2D21 

I think among those three things, you should be able to get a
successful POST.  CF is a far more picky beast than Perl is,
unfortunately...

Best regards, and good luck!
Zac Bedell

> -----Original Message-----
> From: Benji Spencer [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 26, 2000 10:27 AM
> To: CF-Talk
> Subject: Post form data in (to) CF
> 
> 
> I am working on a project where I need to construct the actual HTTP
>  request. I have run into a roadblock with CFM form pages though.
> Does  anyone know how CF handles form data in a post? CF seems to
> be 
> expecting/seeing things different then a CGI script.
> here are a couple of examples as to what I am doing as well as
> there  unexplainable results.
> 
> 1.1) my test PERL script (just displays the post data)
> 
> [/opt/cgi-bin]% cat 2.pl
> #!/usr/local/bin/perl
> use CGI;
> $query=new CGI;
> 
> print $query->header;
> print $query->param('date_id');
> 
> 1.2) The request to that script
> [~]$ telnet xyz 80
> Trying xxx.xxx.xxx.xxx...
> Connected to xyz.xyz.com.
> Escape character is '^]'.
> POST http://xyz.xyz.com/cgi-bin/2.pl HTTP/1.0
> Content-Length: 18
> 
> date_id=2000-09-21
> HTTP/1.1 200 OK
> Date: Tue, 26 Sep 2000 14:08:58 GMT
> Server: xxxxxxxxxxxxxxxxxx
> Last-Modified: Tue, 26 Sep 2000 13:45:57 GMT
> Cache-Control: no-cache
> Connection: close
> Content-Type: text/html
> 
> 2000-09-21Connection closed by foreign host.
> 
> 
> 2.1) the CFM page
> <cfoutput> #form.date_id#</cfoutput>
> 
> 
> 2.2) The request to the CF page
> [~]$ telnet xyz 80
> Trying xxx.xxx.xxx.xxx...
> Connected to xyz.xyz.com.
> Escape character is '^]'.
> POST http://xyz.xyz.com/1.cfm HTTP/1.0
> Content-Length: 18
> 
> date_id=2000-09-21
> HTTP/1.1 200 OK
> Date: Tue, 26 Sep 2000 14:21:53 GMT
> Server: xxxxxxxxxxxxxxxx
> Page-Completion-Status: Normal
> Page-Completion-Status: Abnormal
> Connection: close
> Content-Type: text/html

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBOdC1QQraVoMWBwRBEQJyUQCffLlooluOzEFL801WYHDdSMcTqfoAn36E
fRXJTakEeCjMqP8NJx/pj+OQ
=gPFG
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.

Reply via email to