mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	correct Proxy-Authroization
This commit is contained in:
		
							parent
							
								
									82534eef12
								
							
						
					
					
						commit
						855cc9ed83
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -282,6 +282,7 @@ namespace proxy {
 | 
			
		|||
		bool useConnect = false;
 | 
			
		||||
		if(m_ClientRequest.method == "CONNECT")
 | 
			
		||||
		{
 | 
			
		||||
			m_ClientRequest.RemoveHeader("Proxy-");
 | 
			
		||||
			std::string uri(m_ClientRequest.uri);
 | 
			
		||||
			auto pos = uri.find(":");
 | 
			
		||||
			if(pos == std::string::npos || pos == uri.size() - 1)
 | 
			
		||||
| 
						 | 
				
			
			@ -392,7 +393,7 @@ namespace proxy {
 | 
			
		|||
		if (m_ProxyURL.schema == "http" && (!m_ProxyURL.user.empty () || !m_ProxyURL.pass.empty ()))
 | 
			
		||||
		{
 | 
			
		||||
			// http proxy authorization
 | 
			
		||||
			std::string s = "basic " + i2p::data::ToBase64Standard (m_ProxyURL.user + ":" + m_ProxyURL.pass);
 | 
			
		||||
			std::string s = "Basic " + i2p::data::ToBase64Standard (m_ProxyURL.user + ":" + m_ProxyURL.pass);
 | 
			
		||||
			m_ClientRequest.AddHeader("Proxy-Authorization", s);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue