﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
11894	Patch: Prevent Services API from telling clients to allow Keep-Alive	Bill Meek <keemllib@…>		"If a Services API client includes the ""Conversation"" ""Keep-Alive""
header in a request, the response will contain the same header
information.

However, the Services API does not support persistent connections.

This 'patch' returns ""Close"" if a client requests ""Keep-Alive"" which
will prevent TCP RST (resets) when clients try to reuse a connection.

Not a problem for clients themselves, which can put ""Close"" in
their headers. However, libraries they have no control over, should
receive a ""Close"" if ""Keep-Alive"" is sent.

Tested on: v0.28-pre-325-g326b686. Only with a Services API client,
not any other users of this code.

{{{
diff --git a/mythtv/libs/libmythupnp/httprequest.cpp b/mythtv/libs/libmythupnp/httprequest.cpp
index 2758272..4afbb86 100644
--- a/mythtv/libs/libmythupnp/httprequest.cpp
+++ b/mythtv/libs/libmythupnp/httprequest.cpp
@@ -1028,7 +1028,7 @@ bool HTTPRequest::GetKeepAlive()
     if ( sConnection == ""close"" )
         bKeepAlive = false;
     else if (sConnection == ""keep-alive"")
-        bKeepAlive = true;
+        bKeepAlive = false;
 
    return bKeepAlive;
 }
}}}"	Patch - Bug Fix	closed	minor	0.28	MythTV - Services API - Backend	Master Head	medium	Fixed			0
