[FFmpeg-devel] [PATCH] Add support for digest auth in the http and rtsp protocols

Martin Storsjö martin
Thu Mar 25 22:08:02 CET 2010


On Thu, 25 Mar 2010, Ronald S. Bultje wrote:

> On Thu, Mar 25, 2010 at 4:09 AM, Martin Storsj? <martin at martin.st> wrote:
> > Split the RTSP updates into smaller parts as requested by Ronald, by first
> > changing to use the generic http auth code but hardcoded to basic auth,
> > then later is changed to actually parse the auth headers and choose an
> > auth method depending on what the server suggests.
> [..]
> > +static int find_method_and_url(char *buf, const char **method, const char **url)
> [..]
> 
> As said on IRC, this is a little ugly, we're basically creating a line
> from elements and then splitting again.
> 
> You can say no then I'll do it ;-), but we need to split this function
> a little so it takes (instead of just "cmd") a "method", "uri" and
> "cmd" (which is original cmd - method/uri), and then have
> ff_rtsp_send_cmd_with_content_async() construct the correct first
> line. Might not be ideal, but will prevent the having to split it
> again, which I personally consider ugly.

Ok, tested this approach now.

This requires a bit of modifications to all users of the rtsp_send_cmd 
functions, but IMO it actually cleans some things up a little. And thanks 
to this, the later patches become much more acceptable.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-separate-method-url-parameters-to-the-rtsp_send_.patch
Type: text/x-diff
Size: 16376 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100325/e422e7b0/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Make-RTSP-use-the-generic-http-authentication-code.patch
Type: text/x-diff
Size: 4059 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100325/e422e7b0/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Actually-parse-the-auth-headers-in-RTSP.patch
Type: text/x-diff
Size: 2796 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100325/e422e7b0/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Don-t-force-basic-auth-in-RTSP-but-retry-with-the-se.patch
Type: text/x-diff
Size: 1531 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100325/e422e7b0/attachment-0003.patch>



More information about the ffmpeg-devel mailing list