mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	* HTTPProxy: fix converted request (#508)
* I2PService: reword log message, to avoid ambiguity
This commit is contained in:
		
							parent
							
								
									2628426084
								
							
						
					
					
						commit
						aa764fbd1c
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -189,6 +189,9 @@ namespace proxy {
 | 
			
		|||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		SanitizeHTTPRequest(req);
 | 
			
		||||
 | 
			
		||||
		std::string dest_host = url.host;
 | 
			
		||||
		uint16_t    dest_host = url.port;
 | 
			
		||||
		/* convert proxy-style http req to ordinary one: */
 | 
			
		||||
		/* 1) replace Host header, 2) make relative url */
 | 
			
		||||
		req.add_header("Host", url.host, true);
 | 
			
		||||
| 
						 | 
				
			
			@ -206,7 +209,7 @@ namespace proxy {
 | 
			
		|||
 | 
			
		||||
		/* connect to destination */
 | 
			
		||||
		GetOwner()->CreateStream (std::bind (&HTTPReqHandler::HandleStreamRequestComplete,
 | 
			
		||||
			shared_from_this(), std::placeholders::_1), url.host, url.port);
 | 
			
		||||
			shared_from_this(), std::placeholders::_1), dest_host, dest_port);
 | 
			
		||||
 | 
			
		||||
		return true;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,7 @@ namespace client
 | 
			
		|||
			m_LocalDestination->CreateStream (streamRequestComplete, identHash, port);
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			LogPrint (eLogWarning, "I2PService: Remote destination ", dest, " not found");
 | 
			
		||||
			LogPrint (eLogWarning, "I2PService: Remote destination not found: ", dest);
 | 
			
		||||
			streamRequestComplete (nullptr);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue