Re: How to change the content sent by Describe method of RTSP
On Wed, Mar 12, 2014, at 10:12, zy wu wrote: I compiled the libcurl with that patch , but it seems little effect, prompt 401 Unauthorized. I captured the net packet and found the password is encrpted. Also I followed jeremy's advice, is there anything else to do before set user and password? You could try replacing CURLAUTH_ANY with CURLAUTH_BASIC, that will make the password visible in your wireshark trace. I think you should see in your trace something like the RTSP options request sent, an initial 401 response from the camera, the RTSP options resent then the 200 response (assuming the username and password are correct). is there anything else to do before set user and password? No, just make sure they are set before doing the curl_easy_perform of the CURL_RTSPREQ_OPTIONS. Also, my_curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); should probably read my_curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY); --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: How to change the content sent by Describe method of RTSP
Hi, all: Thank you for your attention once again. I thought password should be set after transcode to base64, but a 401 response. Later I removed the base64 transcoding section, it works ok. Maybe libcurl have transcoded somthing I don't know. Best Regards! 2014-03-14 2:24 GMT+08:00 jer...@fastmail.co.uk: On Wed, Mar 12, 2014, at 10:12, zy wu wrote: I compiled the libcurl with that patch , but it seems little effect, prompt 401 Unauthorized. I captured the net packet and found the password is encrpted. Also I followed jeremy's advice, is there anything else to do before set user and password? You could try replacing CURLAUTH_ANY with CURLAUTH_BASIC, that will make the password visible in your wireshark trace. I think you should see in your trace something like the RTSP options request sent, an initial 401 response from the camera, the RTSP options resent then the 200 response (assuming the username and password are correct). is there anything else to do before set user and password? No, just make sure they are set before doing the curl_easy_perform of the CURL_RTSPREQ_OPTIONS. Also, my_curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); should probably read my_curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY); --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: How to change the content sent by Describe method of RTSP
On Tue, 11 Mar 2014, jer...@fastmail.co.uk wrote: This is a little tricky, there is an outstanding bug with RTSP authentication using libcurl. There is a temporary patch you can apply to your own copy of libcurl posted here http://curl.haxx.se/mail/lib-2014-02/0008.html Just pay attention to my review of and comments to that patch. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: How to change the content sent by Describe method of RTSP
Hi, jeremy and Daniel: I compiled the libcurl with that patch , but it seems little effect, prompt 401 Unauthorized. I captured the net packet and found the password is encrpted. Also I followed jeremy's advice, is there anything else to do before set user and password? Dear Daniel, I saw your commit for that patch . If you know how to do please show me , thanks a lot. Best Regards zy.wu 2014-03-12 16:03 GMT+08:00 Daniel Stenberg dan...@haxx.se: On Tue, 11 Mar 2014, jer...@fastmail.co.uk wrote: This is a little tricky, there is an outstanding bug with RTSP authentication using libcurl. There is a temporary patch you can apply to your own copy of libcurl posted here http://curl.haxx.se/mail/lib- 2014-02/0008.html Just pay attention to my review of and comments to that patch. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
How to change the content sent by Describe method of RTSP
Hi, All: I want to use the RTSP to receive stream data, but when connected to the IP Camera need permission. The default Describe request does't include user and password infomation, so I need to change the content of Describe request, but where to modify the content to be sent ? Please help me . Regards zy.wu --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: How to change the content sent by Describe method of RTSP
On Tue, Mar 11, 2014, at 8:03, zy wu wrote: I want to use the RTSP to receive stream data, but when connected to the IP Camera need permission. This is a little tricky, there is an outstanding bug with RTSP authentication using libcurl. There is a temporary patch you can apply to your own copy of libcurl posted here http://curl.haxx.se/mail/lib-2014-02/0008.html To modify the rtsp.c example code for authentication, add the following lines to rtsp_options(). char *username = username; char *password = password; my_curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); my_curl_easy_setopt(curl, CURLOPT_USERNAME, username); my_curl_easy_setopt(curl, CURLOPT_PASSWORD, password); --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html