cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Bug report

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 20 Feb 2002 23:28:35 +0100 (MET)

On Wed, 20 Feb 2002, Pedro Medeiros wrote:

Thanks for your report!

> I found a bug in curl-7.9.4. I don't know where it is yet, because
> I don't have much time to look at the source code, but I can show
> you the effect of that. I have a php script that displays POST data.
> When I run curl and send -F tags like this:
>
> curl -F key1=value1 -F key2=value2 ... <address>

[snip]

> Every key but the last one misses the finishing "\r\n". So, I supose Apache
> is probably eating 2 chars from the POST data because the boundary is
> reached, but no "\r\n" is found. I could try looking at the code later, but
> if you know of any fix for this, I would appreciate it.

You really need two patches, and you'll get both "included for free" if you
go download the 7.9.5-pre1 archive.

Anyway, the problem with the missing \r\n between the parts is fixed with
this:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/formdata.c.diff?r1=1.30&r2=1.31

And the fact that the global Content-Length: is off with two bytes is fixed
with this patch:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/http.c.diff?r1=1.87&r2=1.88

I hope this helps.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-02-20