title: hiredis fails with username and password in hostname
body: <p>I'm trying to run <code>hiredis</code> in <code>C</code> on <code>CentOS</code>.</p>
  
  <p>The following code seems to run fine:</p>
  
  <pre><code>...
  const char *hostname = "my.redis-as-a-service.com";
  int port = 8765;
  
  const char *cert = "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----\n";
  const char *key = "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----\n";
  const char *ca = "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----\n";
  
  struct timeval tv = { 1, 500000 }; // 1.5 seconds
  redisOptions options = {0};
  REDIS_OPTIONS_SET_TCP(&amp;options, hostname, port);
  options.timeout = &amp;tv;
  c = redisConnectWithOptions(&amp;options);
  
  if (c == NULL || c-&gt;err) {
      if (c) {
          printf("Connection error: %s\n", c-&gt;errstr);
          redisFree(c);
      } else {
          printf("Connection error: can't allocate redis context\n");
      }
      exit(1);
  }
  
  if (redisSecureConnection(c, ca, cert, key, "sni") != REDIS_OK) {
      printf("Couldn't initialize SSL!\n");
      printf("Error: %s\n", c-&gt;errstr);
      redisFree(c);
      exit(1);
  }
  </code></pre>
  
  <p>But when I try to run it against <code>Compose.com</code> which require <code>username</code> and <code>password</code> in the url, like:</p>
  
  <pre><code>const char *hostname = "USERNAME:PASSWORD@my.redis-as-a-service.com";
  </code></pre>
  
  <p>then it fails without a specific error. Simple:</p>
  
  <pre><code>Connection error: Name or service not known
  </code></pre>