cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: https/post help

From: Jared Ingersoll <jared_at_cswv.com>
Date: Thu, 31 Jul 2003 08:38:22 -0400

Thanks for the tips. I changed the "@" sign to "name=" and it made it past
authentication!

Jared

-----Original Message-----
From: Roth, Kevin P. [mailto:KPRoth_at_MAPLLC.com]
Sent: Thursday, July 31, 2003 8:25 AM
To: curl-users_at_lists.sourceforge.net
Subject: RE: https/post help

Could there be a -G somewhere in your data.txt file? If it ended up in just
the right place, I suppose it could have triggered curl's '--get' mode,
where -d (POST) request gets turned into a GET request instead...

I believe your script is slightly flawed though. Instead of:

  data=`cat $1`
  ...
  curl ... -d "@$data"

I think you actually need:

  curl ... -d "@$1"

The @-sign tells curl to do the reading from the file, so your cat command
is unnecessary.

You might also need to use --data-binary (if you require preserving newlines
and other less-than-printable characters).

- Kevin

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-07-31