Only send http Keep-alive header for http 1.0
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2992 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
30c3c88c55
commit
e30ae4fa0e
|
@ -62,6 +62,7 @@ void RemoteCameraHttp::Initialise()
|
||||||
request = stringtf( "GET %s HTTP/%s\r\n", path.c_str(), config.http_version );
|
request = stringtf( "GET %s HTTP/%s\r\n", path.c_str(), config.http_version );
|
||||||
request += stringtf( "User-Agent: %s/%s\r\n", config.http_ua, ZM_VERSION );
|
request += stringtf( "User-Agent: %s/%s\r\n", config.http_ua, ZM_VERSION );
|
||||||
request += stringtf( "Host: %s\r\n", host .c_str());
|
request += stringtf( "Host: %s\r\n", host .c_str());
|
||||||
|
if ( strcmp( config.http_version, "1.0" ) == 0 )
|
||||||
request += stringtf( "Connection: Keep-Alive\r\n" );
|
request += stringtf( "Connection: Keep-Alive\r\n" );
|
||||||
if ( !auth.empty() )
|
if ( !auth.empty() )
|
||||||
request += stringtf( "Authorization: Basic %s\r\n", auth64.c_str() );
|
request += stringtf( "Authorization: Basic %s\r\n", auth64.c_str() );
|
||||||
|
|
Loading…
Reference in New Issue