cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] RTSP-Authentication

From: Martín Germán Duarte <martin.german_at_i2cat.net>
Date: Tue, 4 Feb 2014 11:13:28 +0100

*> I made a patch to libcurl 7.3.1. This patch deals with the 401
Unauthorized *
*> message in the RTSP negotiation, this message is not part of the RTSP *
*> standard, but several IP cameras and RTSP servers need authentication
to *
*> work properly. *
*> *
*> I have attached the readme.patch and the curl.patch *

>Thanks a lot for your contribution, but I have several problems >with this
>patch that we need to work on:

> 1 - why assign 'want = 2'? we have defines for all the auth >values!
Because, for the authentication digest the constant CURLAUTH_DIGEST is 2,
if 'want' is not assign with the allowed values the function pickoneauth
always return FALSE, this is the main reason of this modification. Before
that 'want' was assigned with 2, 'want' had not value, so maybe this is a
bug into the libcurl but I don't know.

> 2 - why are you hardcoding that the request wants Digest auth >there at
all?
for the same reason that I explained before.

> 3 - Have you ran the test suite successfully with your patch >applied?
It
> failed already on test 67 when I tried it.
Yes, with many IP cameras (Axis cameras) and VLC as a RTSP server, and work
properly.

> 4 - Is 401/407 responses for RTSP really defined to never have a >body?
And if
> they are, do you really need the special treatment in the code >then
since
> they won't get more data anyway? The *stop_reading >assignment seems
very
> suspicious to me.
I think it is not neccesary

> 5 - Have you tried to add a test case for this in the curl test suite?
>RTSP
> being so very similar to HTTP can most probably just use the >HTTP
test
> server.
No, I think this is a good a idea, if you want you can do it.

-- 
  / daniel.haxx.se
BR,
  Martin.
-- 
Martín Germán
------------------------------------------------------------
R&D Project Engineer
Audiovisual Unit
Fundació i2CAT www.i2cat.net
Phone +34 935532625
Skype : martin.german.18
------------------------------------------------------------

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-04