curl-users
Re: Newlines in multipart/form-data post
Date: 23 Apr 2004 12:34:16 +0800
Actually, I haven't noticed any difference since applying the patch and
rebuilding. It still loses all but the first line. Have you tested and
confirmed that it's fixed?
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 MarlowReceived on 2004-04-23