cURL
Haxx ad
libcurl
Automatically get a mirror near you





COMPARE PRICES:
Digital cameras, MP3 Players, Camcorders, Mobile phones, PDA, Computers, Electronics LCD monitors, Printers, Notebook, DVD Players, Motherboards, TV, ipod, Processors. See all...

Shopping cart software
Online collaboration software

SourceForge.net Logo

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: Newlines in multipart/form-data post

From: Robert Marlow <bobstopper_at_bobturf.org>
Date: 22 Apr 2004 23:19:48 +0800

Upgraded to v7.11.1 with the same symptoms.

Here's an example line (paraphrased of course):
$ curl -F
"f1=MHIGCSsGAQQBgjdYA6BlMGMGCisGAQQBgjdYAwGgVTBTAgMCAAACAmYDAgIAwAQI
hYBPinzaqcQEEP37GybFXZnCXPRvrFEeLBgEKNx6zGTVv4YPpX8698MYKkKiJ461
9CUepuqUSdw7zJWUyBW31Khk5b8=
MFoGCSsGAQQBgjdYA6BNMEsGCisGAQQBgjdYAwGgPTA7AgMCAAACAmYDAgIAwAQI
L9bqrmEHNRkEEFOmOVCDS+a/qtv/sx6BKzoEEBQoXYjoce0h8UKApU9TFQU=" $URL

In the above example, all that is sent is (some headers removed for
brevity):

Content-Type: multipart/form-data;
boundary=----------------------------5df73f6a4184

------------------------------5df73f6a4184
Content-Disposition: form-data; name="f1"

MHIGCSsGAQQBgjdYA6BlMGMGCisGAQQBgjdYAwGgVTBTAgMCAAACAmYDAgIAwAQI
------------------------------5df73f6a4184--

ie only the first line is given in the form data.

On Thu, 2004-04-22 at 14:18, Daniel Stenberg wrote:
> On Thu, 22 Apr 2004, Robert Marlow wrote:
>
> > I'm writing a script using curl (the executable). The script uses a
> > multipart/form-data post and has several fields it needs to submit. A few of
> > the fields have values which take up several lines. I've noticed only the
> > first lines of these multi-line values are getting submitted.
>
> Can you show us the exact command line and some test files that make this
> happen for you? The formpost code in curl doesn't care about newlines, it adds
> whatever you tell it to.
>
> > Is there any way I can avoid this happening and get all lines submitting
> > with newlines included? I'm using curl 7.9.5.
>
> That curl version is more than two years old. We've fixed hundreds of bugs,
> added thousands of lines source code and added dozens of features since that
> was released.
>
> Please upgrade and check if a recent release doesn't fix your problems.
>
> --
> Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
> Dedicated custom curl help for hire: http://haxx.se/curl.html
>

-- 
Regards,
Robert Marlow
Received on 2004-04-22

These mail archives are generated by hypermail.

donate! Page updated October 16, 2006.
web site info