cURL / Mailing Lists / curl-library / Single Mail

curl-library

HTTP Authentication failed!!

From: hui <lixiaohui9219_at_126.com>
Date: Wed, 21 Dec 2011 16:25:07 +0800

About HTTP Authentication failed

video its URL have no "username:password" can be play,
now I want to play the video its URL is "http://etele:Xdr56tFc@89.147.64.204:8888/RtlKlub", play failed!!!

following is options set:

   curl_easy_setopt(fileData->curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
   curl_easy_setopt(fileData->curl, CURLOPT_USERPWD, "etele:Xdr56tFc");
   curl_easy_setopt(fileData->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
   curl_easy_setopt(fileData->curl, CURLOPT_URL, "http://89.147.64.204:8888/RtlKlub");
   curl_easy_setopt(fileData->curl, CURLOPT_VERBOSE, 1);
   curl_easy_setopt(fileData->curl, CURLOPT_NOPROGRESS, 1);
   curl_easy_setopt(fileData->curl, CURLOPT_FORBID_REUSE, 1);
   curl_easy_setopt(fileData->curl, CURLOPT_WRITEDATA, file);
   curl_easy_setopt(fileData->curl, CURLOPT_WRITEFUNCTION, write_callback);
   curl_easy_setopt(fileData->curl, CURLOPT_WRITEHEADER, file);
   curl_easy_setopt(fileData->curl, CURLOPT_HEADERFUNCTION, header_callback);
   curl_easy_setopt(fileData->curl, CURLOPT_USERAGENT, " TechniSat Mediaplayer (CE-HTML); HbbTV/1.1.1 (; ; ; ; ; )");

#ifdef PROXY_SETTING // PROXY_SETTING not define
   curl_easy_setopt(fileData->curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
   curl_easy_setopt(fileData->curl, CURLOPT_PROXY, (char*)"http://164.129.133.10:8080");
   curl_easy_setopt(fileData->curl, CURLOPT_PROXYUSERPWD, "username:password");
#endif /* PROXY_SETTING */
 
#ifdef URL_REDIRECTION // URL_REDIRECTION have been defined
    curl_easy_setopt( fileData->curl, CURLOPT_FOLLOWLOCATION, TRUE );
    curl_easy_setopt( fileData->curl, CURLOPT_MAXREDIRS, 10 );
#endif /* URL_REDIRECTION */

   if (headers)
   {
      curl_easy_setopt(fileData->curl, CURLOPT_HTTPHEADER, headers);
   }



following is debug infos:

* About to connect() to 89.147.64.204 port 8888 (#0)
* Trying 89.147.64.204... * Connected to 89.147.64.204 (89.147.64.204) port 8888 (#0)
> GET /RtlKlub HTTP/1.1

User-Agent: TechniSat Mediaplayer (CE-HTML); HbbTV/1.1.1 (; ; ; ; ; )

Host: 89.147.64.204:8888

Accept: */*


* HTTP 1.0, assume close after body
< HTTP/1.0 403 Forbidden
< Server: MCast server 0.1

< Accept-Ranges: bytes

< Allow: GET
< Select Timeout
* Closing connection #0

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-21