mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	set port to 80 is not specified
This commit is contained in:
		
							parent
							
								
									d5d501875e
								
							
						
					
					
						commit
						f6d7f7d984
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -223,14 +223,13 @@ namespace proxy {
 | 
			
		|||
			u.parse(t);
 | 
			
		||||
			dest_host = u.host;
 | 
			
		||||
			dest_port = u.port;
 | 
			
		||||
			if (dest_port == 0)
 | 
			
		||||
				dest_port = 80; /* always set port for CreateStream() */
 | 
			
		||||
		} else {
 | 
			
		||||
			/* relative url and missing 'Host' header */
 | 
			
		||||
			std::string message = "Can't detect destination host from request";
 | 
			
		||||
			HTTPRequestFailed(message.c_str());
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		if (!dest_port) dest_port = 80; /* always set port for CreateStream() */ //TODO: 443 for https
 | 
			
		||||
		/* make relative url */
 | 
			
		||||
		url.schema = "";
 | 
			
		||||
		url.host   = "";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue