curl-users
Re: cURL and UNIX to DOS conversions
Date: Tue, 14 Nov 2006 18:24:25 -0800 (PST)
--- steve <steve_at_battisti.us> wrote:
> 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
>
>
Well, don't assume you need root permission to build and install an app - you
can build and install locally.
See my signature for reference; in the yet unreleased version I build 'curl'
among other things.
If we are lucky, you'd have to just run something like
~/AppsFromScratch/20061104/bin/build.pl -targets_to_build curl -make_like 1>build.log 2>&1 &
I don't have access to AIX to test my tool on it, but it was successful on Solaris, and
I run it on Mandriva (and other) Linuxes.
--Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
Received on 2006-11-15