Code Duplication    Length = 12-12 lines in 2 locations

Components/Klarna/transport/xmlrpc-3.0.0.beta/lib/xmlrpc.inc 2 locations

@@ 1573-1584 (lines=12) @@
1570
				curl_setopt($curl, CURLOPT_TIMEOUT, $timeout == 1 ? 1 : $timeout - 1);
1571
			}
1572
1573
			if($username && $password)
1574
			{
1575
				curl_setopt($curl, CURLOPT_USERPWD, $username.':'.$password);
1576
				if (defined('CURLOPT_HTTPAUTH'))
1577
				{
1578
					curl_setopt($curl, CURLOPT_HTTPAUTH, $authtype);
1579
				}
1580
				else if ($authtype != 1)
1581
				{
1582
					error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported by the current PHP/curl install');
1583
				}
1584
			}
1585
1586
			if($method == 'https')
1587
			{
@@ 1632-1643 (lines=12) @@
1629
				}
1630
				curl_setopt($curl, CURLOPT_PROXY, $proxyhost.':'.$proxyport);
1631
				//curl_setopt($curl, CURLOPT_PROXYPORT,$proxyport);
1632
				if($proxyusername)
1633
				{
1634
					curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyusername.':'.$proxypassword);
1635
					if (defined('CURLOPT_PROXYAUTH'))
1636
					{
1637
						curl_setopt($curl, CURLOPT_PROXYAUTH, $proxyauthtype);
1638
					}
1639
					else if ($proxyauthtype != 1)
1640
					{
1641
						error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported by the current PHP/curl install');
1642
					}
1643
				}
1644
			}
1645
1646
			// NB: should we build cookie http headers by hand rather than let CURL do it?