cURL / Mailing Lists / curl-users / Single Mail

curl-users

cURL and UNIX to DOS conversions

From: steve <steve_at_battisti.us>
Date: Tue, 14 Nov 2006 20:47:37 -0500

Howdy folks,

I'm currently using cURL to send a text file to a vendor via an HTTPS form, like this:

curl -F "Username=xxx" -F "Password=xxx-F "UploadFile=@test.txt" https://site/post.aspx -o test.txt.html

One of the problems I'm running into right now is that the vendor is receiving the file, but SURPRISE, the file is in UNIX format, with just the LF character at the end of each line. They need it in DOS format, with both the LF and CR characters.

I've tried running the cURL with the -B switch, but it didn't seem to make a difference. (I didn't particularly expect it to...) Is there anything within cURL that I can do to convert the files to DOS format as a part of the cURL statement? Since I have to send it as a form, I didn't think I could take advantage of --data-ascii

I've tried converting the files prior to sending them using sed and awk, but haven't been able to get it to work. It's an AIX 5.3 box, and the cURL version is 7.9.3. (Yes, I know it's miserably old. Unfortunately, I have slightly less control over that than I do the weather. If you could say categorically that upgrading the version would allow me to fix this issue, I could probably make a case for getting a newer version of cURL.)

Thanks very much,

Steve
Received on 2006-11-15