[FFmpeg-devel] [RFC] Add option for using PUT instead of POST in HTTP protocol

Martin Storsjö martin
Mon Aug 2 16:51:45 CEST 2010


On Mon, 2 Aug 2010, Tomas H?rdin wrote:

> On Mon, 2010-08-02 at 09:31 +0200, Niobos wrote:
> > I might be violating a couple of dozen coding practices here, but I'll
> > risk being flamed.
> > 
> > On 2010-07-30 16:07, Tomas H?rdin wrote:
> > > As a proposal, I added an int called "put" in HTTPContext, and a
> > > corresponding AVOption. If non-zero, it uses "PUT" instead of "POST" for
> > > uploads.
> > Why not an "enum {POST, PUT} method"? That way it's easy to extend it to
> > whatever other method someone might have invented for whatever purpose?
> 
> HTTP only has PUT and POST for data upload AFAIK. There are some other
> methods besides those and GET, like HEAD and DELETE. In that case maybe
> a string option would be a better idea?

Perhaps, but on the other hand, the http method is chosen between get and 
post at the moment, depending on the read/write flags when opened, so 
being able to specify it manually feels odd compared to this. On the other 
hand, perhaps it could be seen as ok to be able to override it with any 
method you like to use.

I'd still like to point out that the libavformat URLProtocols aren't 
general-purpose abstractions, but mostly aimed to work as data 
input/output streams (afaik) - being able to do e.g. a DELETE through this 
API feels quite weird.

// Martin



More information about the ffmpeg-devel mailing list