summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-09-30 14:45:28 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-10-30 18:00:01 (GMT)
commit87ff0cf5d0efcda674bbeb0aec306e92c7527ac5 (patch)
tree232a1d7ff34ed4479ce5c302b112cabc21d95305 /Swiften/Network/BOSHConnectionPool.h
parent4a6950af0f324091553f7ab7271de45721b8667f (diff)
downloadswift-87ff0cf5d0efcda674bbeb0aec306e92c7527ac5.zip
swift-87ff0cf5d0efcda674bbeb0aec306e92c7527ac5.tar.bz2
Fix issues with HTTPTrafficFilter for HTTP proxy / BOSH usage
This patch fixes the code to handle HTTP/1.0 proxies which do not keep the connection alive after a single request. If a HTTPTrafficFilter returns a new header reply, the HTTP CONNECT proxy code will issue the request over a new connection. The final connection is kept alive, as it used for the persistent connection forwarding. In addition, the response status line is now passed to the HTTPTrafficFilter handling method to provide ability to act upon the response status code. Missing passthrough of the HTTPTrafficFilter object the down the stack to the HTTPConnectProxiedConnection is added. Test-Information: Added a unit test following an NTLM HTTP proxy authentication with a static HTTPTrafficFilter. This and other unit tests still pass. Change-Id: Ida0d1aec08a60f10c1480e1eecaecbd3f87b0dca
Diffstat (limited to 'Swiften/Network/BOSHConnectionPool.h')
-rw-r--r--Swiften/Network/BOSHConnectionPool.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Network/BOSHConnectionPool.h b/Swiften/Network/BOSHConnectionPool.h
index d845a3d..eaef56c 100644
--- a/Swiften/Network/BOSHConnectionPool.h
+++ b/Swiften/Network/BOSHConnectionPool.h
@@ -14,16 +14,16 @@
#include <Swiften/Network/BOSHConnection.h>
#include <Swiften/TLS/TLSOptions.h>
-
namespace Swift {
- class HTTPConnectProxiedConnectionFactory;
- class TLSConnectionFactory;
class CachingDomainNameResolver;
class EventLoop;
+ class HTTPConnectProxiedConnectionFactory;
+ class HTTPTrafficFilter;
+ class TLSConnectionFactory;
class SWIFTEN_API BOSHConnectionPool : public boost::bsignals::trackable {
public:
- BOSHConnectionPool(const URL& boshURL, DomainNameResolver* resolver, ConnectionFactory* connectionFactory, XMLParserFactory* parserFactory, TLSContextFactory* tlsFactory, TimerFactory* timerFactory, EventLoop* eventLoop, const std::string& to, unsigned long long initialRID, const URL& boshHTTPConnectProxyURL, const SafeString& boshHTTPConnectProxyAuthID, const SafeString& boshHTTPConnectProxyAuthPassword, const TLSOptions& tlsOptions);
+ BOSHConnectionPool(const URL& boshURL, DomainNameResolver* resolver, ConnectionFactory* connectionFactory, XMLParserFactory* parserFactory, TLSContextFactory* tlsFactory, TimerFactory* timerFactory, EventLoop* eventLoop, const std::string& to, unsigned long long initialRID, const URL& boshHTTPConnectProxyURL, const SafeString& boshHTTPConnectProxyAuthID, const SafeString& boshHTTPConnectProxyAuthPassword, const TLSOptions& tlsOptions, boost::shared_ptr<HTTPTrafficFilter> trafficFilter = boost::shared_ptr<HTTPTrafficFilter>());
~BOSHConnectionPool();
void write(const SafeByteArray& data);
void writeFooter();