diff -ur original/curl-7.19.1/docs/libcurl/curl_easy_setopt.3 fix_colon_in_username/curl-7.19.1/docs/libcurl/curl_easy_setopt.3
--- original/curl-7.19.1/docs/libcurl/curl_easy_setopt.3	2008-09-08 05:00:16.000000000 +0300
+++ fix_colon_in_username/curl-7.19.1/docs/libcurl/curl_easy_setopt.3	2008-09-25 13:19:10.984000000 +0300
@@ -601,14 +601,35 @@
 Pass a char * as parameter, which should be [user name]:[password] to use for
 the connection to the HTTP proxy.  Use \fICURLOPT_PROXYAUTH\fP to decide
 authentication method.
+.IP CURLOPT_USERNAME
+Pass a char * as parameter, which should be [user name] to use for
+the connection. Use \fICURLOPT_HTTPAUTH\fP to decide authentication method.
+
+The CURLOPT_USERNAME option should be used in same way
+as the \fICURLOPT_USERPWD\fP is used.
+In comparison to \fICURLOPT_USERPWD\fP the CURLOPT_USERNAME allows the username
+to contain colon, like in following example: "sip:user@example.com".
+Note the CURLOPT_USERNAME option is an alternative way to set the user name.
+There is no meaning to use it together with the \fICURLOPT_USERPWD\fP option.
+
+In order to specify the password to be used in conjunction with the user name
+use the \fICURLOPT_PASSWORD\fP option.
+(Added in 7.19.2)
+.IP CURLOPT_PASSWORD
+Pass a char * as parameter, which should be [password] to use for
+the connection. Use \fICURLOPT_HTTPAUTH\fP to decide authentication method.
+
+The CURLOPT_PASSWORD option should be used in conjunction with
+as the \fICURLOPT_USERNAME\fP option. (Added in 7.19.2)
 .IP CURLOPT_HTTPAUTH
 Pass a long as parameter, which is set to a bitmask, to tell libcurl what
 authentication method(s) you want it to use. The available bits are listed
 below. If more than one bit is set, libcurl will first query the site to see
 what authentication methods it supports and then pick the best one you allow
 it to use. For some methods, this will induce an extra network round-trip. Set
-the actual name and password with the \fICURLOPT_USERPWD\fP option. (Added in
-7.10.6)
+the actual name and password with the \fICURLOPT_USERPWD\fP option or
+with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options.
+(Added in 7.10.6)
 .RS
 .IP CURLAUTH_BASIC
 HTTP Basic authentication. This is the default choice, and the only method
diff -ur original/curl-7.19.1/include/curl/curl.h fix_colon_in_username/curl-7.19.1/include/curl/curl.h
--- original/curl-7.19.1/include/curl/curl.h	2008-09-06 05:00:10.000000000 +0300
+++ fix_colon_in_username/curl-7.19.1/include/curl/curl.h	2008-09-25 13:18:39.484000000 +0300
@@ -1141,6 +1141,10 @@
      working with OpenSSL-powered builds. */
   CINIT(CERTINFO, LONG, 172),
 
+  /* "name" and "pwd" to use when fetching. */
+  CINIT(USERNAME, OBJECTPOINT, 173),
+  CINIT(PASSWORD, OBJECTPOINT, 174),
+
   CURLOPT_LASTENTRY /* the last unused */
 } CURLoption;
 
diff -ur original/curl-7.19.1/include/curl/typecheck-gcc.h fix_colon_in_username/curl-7.19.1/include/curl/typecheck-gcc.h
--- original/curl-7.19.1/include/curl/typecheck-gcc.h	2008-06-10 05:00:16.000000000 +0300
+++ fix_colon_in_username/curl-7.19.1/include/curl/typecheck-gcc.h	2008-09-25 13:18:50.577750000 +0300
@@ -196,6 +196,8 @@
    (option) == CURLOPT_INTERFACE ||                                           \
    (option) == CURLOPT_NETRC_FILE ||                                          \
    (option) == CURLOPT_USERPWD ||                                             \
+   (option) == CURLOPT_USERNAME ||                                            \
+   (option) == CURLOPT_PASSWORD ||                                            \
    (option) == CURLOPT_PROXYUSERPWD ||                                        \
    (option) == CURLOPT_ENCODING ||                                            \
    (option) == CURLOPT_REFERER ||                                             \
Only in fix_colon_in_username/curl-7.19.1/lib: LIB-Release
diff -ur original/curl-7.19.1/lib/url.c fix_colon_in_username/curl-7.19.1/lib/url.c
--- original/curl-7.19.1/lib/url.c	2008-09-25 05:00:12.000000000 +0300
+++ fix_colon_in_username/curl-7.19.1/lib/url.c	2008-09-25 13:22:33.765250000 +0300
@@ -1528,7 +1528,45 @@
     /*
      * user:password to use in the operation
      */
-    result = setstropt(&data->set.str[STRING_USERPWD],
+    {
+      char* userpwd = va_arg(param, char *);
+      char* separator = strchr(userpwd, ':');
+      if (separator != NULL) {
+
+        /* store username part of option */
+        char * p;
+        size_t username_len = (size_t)(separator-userpwd);
+        p = malloc(username_len+1);
+        if(!p)
+          result = CURLE_OUT_OF_MEMORY;
+        else {
+            memcpy(p, userpwd, username_len);
+            p[username_len] = '\0';
+            data->set.str[STRING_USERNAME] = p;
+        }
+
+        /* store password part of option */
+        if (result == CURLE_OK) {
+          result = setstropt(&data->set.str[STRING_PASSWORD], separator+1);
+        }
+      }
+      else {
+        result = setstropt(&data->set.str[STRING_USERNAME], userpwd);
+      }
+    }
+    break;
+  case CURLOPT_USERNAME:
+    /*
+     * user:password to use in the operation
+     */
+    result = setstropt(&data->set.str[STRING_USERNAME],
+                       va_arg(param, char *));
+    break;
+  case CURLOPT_PASSWORD:
+    /*
+     * user:password to use in the operation
+     */
+    result = setstropt(&data->set.str[STRING_PASSWORD],
                        va_arg(param, char *));
     break;
   case CURLOPT_POSTQUOTE:
@@ -3726,12 +3764,13 @@
                               struct connectdata *conn,
                               char *user, char *passwd)
 {
-  if(data->set.str[STRING_USERPWD] != NULL) {
-    /* the name is given, get user+password */
-    sscanf(data->set.str[STRING_USERPWD],
-           "%" MAX_CURL_USER_LENGTH_TXT "[^:]:"
-           "%" MAX_CURL_PASSWORD_LENGTH_TXT "[^\n]",
-           user, passwd);
+  if(data->set.str[STRING_USERNAME] != NULL) {
+    strncpy(user, data->set.str[STRING_USERNAME], MAX_CURL_USER_LENGTH);
+    user[MAX_CURL_USER_LENGTH-1] = '\0';   /*To be on safe side*/
+  }
+  if(data->set.str[STRING_PASSWORD] != NULL) {
+    strncpy(passwd, data->set.str[STRING_PASSWORD], MAX_CURL_PASSWORD_LENGTH);
+    passwd[MAX_CURL_PASSWORD_LENGTH-1] = '\0'; /*To be on safe side*/
   }
 
   conn->bits.netrc = FALSE;
@@ -4091,7 +4130,7 @@
                                 && (conn->proxytype == CURLPROXY_HTTP));
 
 
-  conn->bits.user_passwd = (bool)(NULL != data->set.str[STRING_USERPWD]);
+  conn->bits.user_passwd = (bool)(NULL != data->set.str[STRING_USERNAME]);
   conn->bits.proxy_user_passwd = (bool)(NULL != data->set.str[STRING_PROXYUSERPWD]);
   conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
   conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
diff -ur original/curl-7.19.1/lib/urldata.h fix_colon_in_username/curl-7.19.1/lib/urldata.h
--- original/curl-7.19.1/lib/urldata.h	2008-09-06 05:00:10.000000000 +0300
+++ fix_colon_in_username/curl-7.19.1/lib/urldata.h	2008-09-25 13:22:38.296500000 +0300
@@ -1334,10 +1334,11 @@
   STRING_SSL_EGDSOCKET,   /* path to file containing the EGD daemon socket */
   STRING_SSL_RANDOM_FILE, /* path to file containing "random" data */
   STRING_USERAGENT,       /* User-Agent string */
-  STRING_USERPWD,         /* <user:password>, if used */
   STRING_SSH_HOST_PUBLIC_KEY_MD5, /* md5 of host public key in ascii hex */
   STRING_SSL_CRLFILE,     /* crl file to check certificate */
   STRING_SSL_ISSUERCERT,  /* issuer cert file to check certificate */
+  STRING_USERNAME,        /* <username>, if used */
+  STRING_PASSWORD,        /* <password>, if used */
 
   /* -- end of strings -- */
   STRING_LAST /* not used, just an end-of-list marker */
Only in fix_colon_in_username/curl-7.19.1/src: LIB-Release
