cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problems dealing with Authorization in RTSP

From: Christopher Conroy <cconroy_at_gmail.com>
Date: Wed, 4 Aug 2010 13:37:10 -0400

On Wed, Aug 4, 2010 at 7:54 AM, Tello Oraa <tello.oraa_at_sumenor.com> wrote:
> Hi, Iím writing a RTSP client and I canít find out how to provide
> authorization when sending a Describe message. Iíve tried setting
> CURLOPT_USERPWD but I have only succeeded with HTTP requests and not with
> RTSP requests. And so, Iím stuck with 401 Unauthorized responses (see the
> output #1 below).
>
>
>
> I have also tried by 64base encoding myself the user and password and adding
> a custom header with that like this:
>
> Authorization: Basic ty6vdTy2dmlwc3VtXW
>
> This way I donít get a 401 error, but a 200 OK what should be good, but then
> the program gets stuck (output #2 below)
>
>
>
> Any comment regarding this issue would be highly appreciated.
>
>
>
> Regards,
>
>
>
> [Output #1]
>
>
>
> * About to connect() to 192.168.0.65 port 554 (#0)
>
> *†† Trying 192.168.0.65... * connected
>
> * Connected to 192.168.0.65 (192.168.0.65) port 554 (#0)
>
>> OPTIONS rtsp://myserver/path?videocdc=h.264 RTSP/1.0
>
> CSeq: 1
>
>
>
> < RTSP/1.0 200 OK
>
> < CSeq: 1
>
> < Public: DESCRIBE, GET_PARAMETER, PAUSE, PLAY, SETUP, SET_PARAMETER,
> TEARDOWN
>
> < Date: Wed, 04 Aug 2010 11:31:18 GMT
>
> <
>
> * Connection #0 to host 192.168.0.65 left intact
>
>
>
> * Re-using existing connection! (#0) with host 192.168.0.65
>
> * Connected to 192.168.0.65 (192.168.0.65) port 554 (#0)
>
>> DESCRIBE rtsp://myserver/path?videocdc=h.264 RTSP/1.0
>
> CSeq: 2
>
> Accept: application/sdp
>
> If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT
>
>
>
>
> < RTSP/1.0 401 Unauthorized
>
> < CSeq: 2
>
> < WWW-Authenticate: Digest realm="ISIS_00408CA15D41",
> nonce="0006b693Y085741c912e53c60710b9427535338f3a73d1", stale=FALSE
>
> < WWW-Authenticate: Basic realm="ISIS_00408CA15D41"
>
>
>
>
>
> [OUTPUT #2]
>
>
>
> (Ö)
>
>
>
> * Re-using existing connection! (#0) with host 192.168.0.65
>
> * Connected to 192.168.0.65 (192.168.0.65) port 554 (#0)
>
>> DESCRIBE rtsp://myserver/path?videocdc=h.264 RTSP/1.0
>
> CSeq: 2
>
> Accept: application/sdp
>
> If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT
>
>
>
>
> < RTSP/1.0 200 OK
>
> < CSeq: 2
>
> < Date: Wed, 04 Aug 2010 11:30:13 GMT
>
> <
>
> † --- Gets stuck here

It doesn't work because it's not implemented yet.

from rtsp.c:
/*
 * TODO (general)
 * -incoming server requests
 * -server CSeq counter
 * -digest authentication
 * -connect thru proxy
 * -pipelining?
 */

-- 
Chris Conroy
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-04