curl-and-python

Re: pycurl.FORM_CONTENTHEADER

From: Dima Tisnek <dimaqq_at_gmail.com>
Date: Tue, 15 Oct 2013 11:50:14 -0700

well what I really wanted was own read function per multipart "part",
as I intended to stream data from several files with custom processing
on the fly.

I see now that's not easy.

I may play around with this patch only for filename, using existing
mechanism for multipart data, but as that covers only part of my
original plan, I can't give any timeframe when I get around to do
this.

thanks for the pointer to the patch anyway, it's a start!

d.

On 15 October 2013 11:42, Oleg Pudeyev <oleg+pycurl_at_bsdpower.com> wrote:
> On Mon, 14 Oct 2013 17:05:29 -0700
> Dima Tisnek <dimaqq_at_gmail.com> wrote:
>
>> the patch is pretty old. does it still apply cleanly?
>
> I rebased and updated it several times.
>
>> also, what are those magic bits in xdecref?
>
> pycurl objects are fairly complex and their parts need to be freed in a
> certain sequence. Also operations like reset free some but not all
> parts of pycurl objects. Bit fields are for these memory groups.
>
>> How about support any CURLOPT_ flag that is possible in multipart
>> post?
>
> This probably will not be easily possible due to memory management
> issues, i.e., the python objects that are handed to libcurl need to
> have their reference counts incremented to ensure they are not freed
> while libcurl is using them.
>
>> Overall content-length may or may not be possible to compute in
>> advance.
>
> Certainly.
>
> Oleg
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-10-15