[FFmpeg-devel] [Patch] Use Transfer-Encoding: chunked (and perhaps PUT) for HTTP uploads
Mon Dec 21 18:47:44 CET 2009
On Mon, 2009-12-21 at 10:48 -0500, Ronald S. Bultje wrote:
> Hi Tomas,
> On Mon, Dec 21, 2009 at 8:58 AM, Tomas H?rdin <tomas.hardin at codemill.se> wrote:
> > To remedy this I added the flag "chunked_upload" to HTTPContext and
> > modified http_connect(), http_write() and http_close() appropriately.
> There's "chunksize" already, that should be sufficient (-1 if not
> chunked, set if chunked). Is there a specific reason why the new
> variable is needed?
I considered that, but I didn't think about URLContext::flags. Without
that there's no way to distinguish chunksize == 1 between "last chunk
was of size 1" from "we're using chunked encoding" in http_close() since
we don't know if we're uploading or downloading. Luckily I can simply
check for URL_WRONLY.
> I agree using POST is a little bit weird, but I disagree that it's
> wrong. Both are fine in different situations. The default should
> probably be PUT though, not POST.
I've attached a version which does not add anything to HTTPContext.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3414 bytes
Desc: not available
More information about the ffmpeg-devel