diff -crB ./lib/http.c ../curl-7.31.0_patch/lib/http.c
*** ./lib/http.c	2013-06-22 00:29:04.000000000 +0200
--- ../curl-7.31.0_patch/lib/http.c	2013-08-06 10:07:13.009546172 +0200
***************
*** 444,449 ****
--- 444,450 ----
    if(conn->bits.user_passwd &&
       ((data->req.httpcode == 401) ||
        (conn->bits.authneg && data->req.httpcode < 300))) {
+     (*data).state.authhost.want = 2;
      pickhost = pickoneauth(&data->state.authhost);
      if(!pickhost)
        data->state.authproblem = TRUE;
***************
*** 451,456 ****
--- 452,458 ----
    if(conn->bits.proxy_user_passwd &&
       ((data->req.httpcode == 407) ||
        (conn->bits.authneg && data->req.httpcode < 300))) {
+     (*data).state.authproxy.want = 2;
      pickproxy = pickoneauth(&data->state.authproxy);
      if(!pickproxy)
        data->state.authproblem = TRUE;
***************
*** 2985,2990 ****
--- 2986,2999 ----
           */
          if(data->set.opt_no_body)
            *stop_reading = TRUE;
+ #ifndef CURL_DISABLE_RTSP
+         /* If we get an unauthorized error during an RTSP DESCRIBE request,
+            then don't expect a body */
+         else if((conn->handler->protocol & CURLPROTO_RTSP) &&
+                 (data->set.rtspreq == RTSPREQ_DESCRIBE) &&
+                 ((k->httpcode == 401) || (k->httpcode == 407)))
+           *stop_reading = TRUE;
+ #endif
          else {
            /* If we know the expected size of this document, we set the
               maximum download size to the size of the expected

diff -crB ./lib/rtsp.c ../curl-7.31.0_patch/lib/rtsp.c
*** ./lib/rtsp.c	2013-08-06 10:15:05.089546183 +0200
--- ../curl-7.31.0_patch/lib/rtsp.c	2013-08-06 10:15:07.309546263 +0200
***************
*** 236,241 ****
--- 236,243 ----
    const char *p_stream_uri = NULL;
    const char *p_transport = NULL;
    const char *p_uagent = NULL;
+   const char *p_proxyuserpwd = NULL;
+   const char *p_userpwd = NULL;
  
    *done = TRUE;
  
***************
*** 394,399 ****
--- 396,407 ----
      p_uagent = conn->allocptr.uagent;
    }
  
+   /* setup the authentication headers */
+   result = Curl_http_output_auth(conn, p_request, p_stream_uri, FALSE);
+   if(result)
+     return result;
+   p_proxyuserpwd = conn->allocptr.proxyuserpwd;
+   p_userpwd = conn->allocptr.userpwd;
    /* Referrer */
    Curl_safefree(conn->allocptr.ref);
    if(data->change.referer && !Curl_checkheaders(data, "Referer:"))
***************
*** 467,479 ****
                              "%s" /* range */
                              "%s" /* referrer */
                              "%s" /* user-agent */
                              ,
                              p_transport ? p_transport : "",
                              p_accept ? p_accept : "",
                              p_accept_encoding ? p_accept_encoding : "",
                              p_range ? p_range : "",
                              p_referrer ? p_referrer : "",
!                             p_uagent ? p_uagent : "");
    if(result)
      return result;
  
--- 475,498 ----
                              "%s" /* range */
                              "%s" /* referrer */
                              "%s" /* user-agent */
+                             "%s" /* proxyuserpwd */
+                             "%s" /* userpwd */
                              ,
                              p_transport ? p_transport : "",
                              p_accept ? p_accept : "",
                              p_accept_encoding ? p_accept_encoding : "",
                              p_range ? p_range : "",
                              p_referrer ? p_referrer : "",
!                             p_uagent ? p_uagent : "",
!                             p_proxyuserpwd ? p_proxyuserpwd : "",
!                             p_userpwd ? p_userpwd : "");
!   /*
!    * Free userpwd now --- cannot reuse this for Negotiate and possibly NTLM
!    * with basic and digest, it will be freed anyway by the next request
!    */
!   Curl_safefree (conn->allocptr.userpwd);
!   conn->allocptr.userpwd = NULL;
! 
    if(result)
      return result;
