mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	Started rewrite of HTTPServer.
This commit is contained in:
		
							parent
							
								
									3d30b4bbbc
								
							
						
					
					
						commit
						e7350a3af4
					
				
					 6 changed files with 269 additions and 1066 deletions
				
			
		| 
						 | 
				
			
			@ -125,6 +125,7 @@ BOOST_AUTO_TEST_CASE(HTTPResponseStatusMessage)
 | 
			
		|||
    BOOST_CHECK_EQUAL(Response(502).getStatusMessage(), "Not Implemented");
 | 
			
		||||
    BOOST_CHECK_EQUAL(Response(504).getStatusMessage(), "Gateway Timeout");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
BOOST_AUTO_TEST_CASE(WriteHTTPResponse)
 | 
			
		||||
{
 | 
			
		||||
    Response rsp(200);
 | 
			
		||||
| 
						 | 
				
			
			@ -136,5 +137,16 @@ BOOST_AUTO_TEST_CASE(WriteHTTPResponse)
 | 
			
		|||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
BOOST_AUTO_TEST_CASE(WriteHTTPResponseWithContent)
 | 
			
		||||
{
 | 
			
		||||
    Response rsp(200, "Test content.");
 | 
			
		||||
    rsp.setHeader("Connection", "close");
 | 
			
		||||
    BOOST_CHECK_EQUAL(
 | 
			
		||||
        rsp.toString(),
 | 
			
		||||
        "HTTP/1.1 200 OK\r\n"
 | 
			
		||||
        "Connection: close\r\n\r\n"
 | 
			
		||||
        "Test content."
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
BOOST_AUTO_TEST_SUITE_END()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue