cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Newlines in multipart/form-data post

From: Robert Marlow <bobstopper_at_bobturf.org>
Date: 23 Apr 2004 09:28:38 +0800

Excellent! Thanks :)

On Thu, 2004-04-22 at 23:21, Daniel Stenberg wrote:
> On Thu, 22 Apr 2004, Robert Marlow wrote:
>
> > Upgraded to v7.11.1 with the same symptoms.
> >
> > Here's an example line (paraphrased of course):
>
> Aaaaaah! You are of course 100% correct, and here's the patch that removes
> this silly behavior!
>
> diff -u -r1.253 main.c
> --- src/main.c 14 Apr 2004 12:00:53 -0000 1.253
> +++ src/main.c 22 Apr 2004 15:25:35 -0000
> @@ -767,7 +767,7 @@
> contents = malloc(strlen(input));
> contents[0] = '\000';
>
> - if(1 <= sscanf(input, "%255[^=]=%[^\n]", name, contents)) {
> + if(1 <= sscanf(input, "%255[^=]=%s", name, contents)) {
> /* the input was using the correct format */
> contp = contents;
>
>
> --
> 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-23