cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: MIME headers

From: kris <kris_at_2binteractive.com>
Date: Mon, 02 Feb 2004 09:11:24 -0600

Hi Daniel,

Here is my output. I just have one -H "{headers}" with \n between each
header I want. Is this right or do I need a
-H "{header}" for each header to be sent? Thanks again for your help.
I looked at the test case and it looks like what I'm doing below, as far
as I can tell.
Hopefully we can figure it out. Thanks again - PS - I'm :

# curl --version
curl 7.10.8 (i386-portbld-freebsd4.8) libcurl/7.10.8 OpenSSL/0.9.7a
zlib/1.1.4
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: SSL libz NTLM

Hope this helps - - Let me know if I can provide anything else. I'm
hoping to put this to bed early this week. Thanks again - Kris
OUTPUT:

/usr/local/bin/curl -m 120 -H "POST /AUTHORIZE HTTP/1.0
MIME-Version: 1.0
Content-type: application/PTI21
Content-length: 1278
Content-transfer-encoding: text
Request-number: 1
Document-type: Request

" -d "<Request><AC><CommonData> <CommonMandatory AuthOverrideInd="N" LangInd="00" CardHolderAttendanceInd="01" HcsTcsInd="T" TxCatg="7" MessageType="A" Version="2" TzCode="xxx"> <AccountNum AccountTypeInd="xx"></AccountNum><POSDetails POSEntryMode="01"/><MerchantID>xxx</MerchantID><TerminalID TermEntCapInd="05" CATInfoInd="06" TermLocInd="01" CardPresentInd="N" POSConditionCode="59" AttendedTermDataInd="01">xxx</TerminalID><BIN>000002</BIN><OrderID>0000000100000000</OrderID><AmountDetails><Amount>100</Amount></AmountDetails><TxTypeCommon TxTypeID="G"/><Currency CurrencyCode="840" CurrencyExponent="2"/><CardPresence><CardNP><Exp></Exp></CardNP></CardPresence><TxDateTime/></CommonMandatory><CommonOptional><Comments>AVS/CVV2 Auth Request</Comments><ShippingRef>No Shipping</ShippingRef><CardSecVal ></CardSecVal><ECommerceData ECSecurityInd="07"><ECOrderNum>0000000100000000</ECOrderNum></ECommerceData></CommonOptional></CommonData><Auth><AuthMandatory FormatInd="H"/><AuthOptional><AVSextended><AVSname></AVSname><
AVSaddress1></AVSaddress1><AVSaddress2></AVSaddress2><AVScity></AVScity><AVSstate></AVSstate><AVSzip></AVSzip></AVSextended></AuthOptional></Auth><Cap><CapMandatory><EntryDataSrc>02</EntryDataSrc></CapMandatory><CapOptional/></Cap></AC></Request>"

.

Daniel Stenberg wrote:

>On Mon, 2 Feb 2004, kris wrote:
>
>
>
>>Hello, and thank you for the reply. I dont know how to show you the command
>>line. I've never seen it either. I didn't know there was a way.
>>
>>
>
>Uh, well me neither but then we have a problem. What if you just replace the
>exec() with a print or echo or something, won't that just display the line
>intead of trying to run it as a shell command?
>
>
>
>>I am using PHP to exec() the command so I assume what is inside exec("") in
>>my previous email was how you would type it directly to the command line.
>>
>>
>
>Well, I can do 'curl -d POSTDATA -H "Content-Type: myown/fake-fake" [URL]' and
>it works just as expected.
>
>
>
>>How do I see test case 97?
>>
>>
>
>Since I just wrote it, it is only available in CVS (dev sources). The point I
>was trying to make with the talk of test case 97 was not so much to show you
>the test case but to say that I can make curl do this.
>
>
>
>>What are you talking about exactly?
>>
>>
>
>It is a new test in the curl test suite.
>
>
>
>>Is this something available on the web?
>>
>>
>
>Yes, you can see the data file used for it here:
>http://cvs.php.net/co.php/curl/tests/data/test97?r=1.1
>
>This is a single file used to describe and run a single test case in the curl
>test suite. The file format is described here:
>http://cvs.php.net/co.php/curl/tests/FILEFORMAT?r=1.21
>
>Anyway, the command line is within the <command> and </command> tags and as
>you can see it is very simple.
>
>
>

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-02-02