summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/HTTPConnectProxiedConnection.cpp')
-rw-r--r--Swiften/Network/HTTPConnectProxiedConnection.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Network/HTTPConnectProxiedConnection.cpp b/Swiften/Network/HTTPConnectProxiedConnection.cpp
index 8eba49e..e63b8e2 100644
--- a/Swiften/Network/HTTPConnectProxiedConnection.cpp
+++ b/Swiften/Network/HTTPConnectProxiedConnection.cpp
@@ -5,7 +5,7 @@
5 */ 5 */
6 6
7/* 7/*
8 * Copyright (c) 2011-2018 Isode Limited. 8 * Copyright (c) 2011-2019 Isode Limited.
9 * All rights reserved. 9 * All rights reserved.
10 * See the COPYING file for more information. 10 * See the COPYING file for more information.
11 */ 11 */
@@ -77,7 +77,7 @@ void HTTPConnectProxiedConnection::initializeProxy() {
77 nextHTTPRequestHeaders_.clear(); 77 nextHTTPRequestHeaders_.clear();
78 } 78 }
79 append(data, createSafeByteArray("\r\n")); 79 append(data, createSafeByteArray("\r\n"));
80 SWIFT_LOG(debug) << "HTTP Proxy send headers: " << byteArrayToString(ByteArray(data.begin(), data.end())) << std::endl; 80 SWIFT_LOG(debug) << "HTTP Proxy send headers: " << byteArrayToString(ByteArray(data.begin(), data.end()));
81 write(data); 81 write(data);
82} 82}
83 83
@@ -111,7 +111,7 @@ void HTTPConnectProxiedConnection::sendHTTPRequest(const std::string& statusLine
111 111
112void HTTPConnectProxiedConnection::handleProxyInitializeData(std::shared_ptr<SafeByteArray> data) { 112void HTTPConnectProxiedConnection::handleProxyInitializeData(std::shared_ptr<SafeByteArray> data) {
113 std::string dataString = byteArrayToString(ByteArray(data->begin(), data->end())); 113 std::string dataString = byteArrayToString(ByteArray(data->begin(), data->end()));
114 SWIFT_LOG(debug) << data << std::endl; 114 SWIFT_LOG(debug) << data;
115 httpResponseBuffer_.append(dataString); 115 httpResponseBuffer_.append(dataString);
116 116
117 std::string statusLine; 117 std::string statusLine;
@@ -141,17 +141,17 @@ void HTTPConnectProxiedConnection::handleProxyInitializeData(std::shared_ptr<Saf
141 if (tmp.size() > 1) { 141 if (tmp.size() > 1) {
142 try { 142 try {
143 int status = boost::lexical_cast<int>(tmp[1]); 143 int status = boost::lexical_cast<int>(tmp[1]);
144 SWIFT_LOG(debug) << "Proxy Status: " << status << std::endl; 144 SWIFT_LOG(debug) << "Proxy Status: " << status;
145 if (status / 100 == 2) { // all 2XX states are OK 145 if (status / 100 == 2) { // all 2XX states are OK
146 setProxyInitializeFinished(true); 146 setProxyInitializeFinished(true);
147 } 147 }
148 else { 148 else {
149 SWIFT_LOG(debug) << "HTTP Proxy returned an error: " << httpResponseBuffer_ << std::endl; 149 SWIFT_LOG(debug) << "HTTP Proxy returned an error: " << httpResponseBuffer_;
150 setProxyInitializeFinished(false); 150 setProxyInitializeFinished(false);
151 } 151 }
152 } 152 }
153 catch (boost::bad_lexical_cast&) { 153 catch (boost::bad_lexical_cast&) {
154 SWIFT_LOG(warning) << "Unexpected response: " << tmp[1] << std::endl; 154 SWIFT_LOG(warning) << "Unexpected response: " << tmp[1];
155 setProxyInitializeFinished(false); 155 setProxyInitializeFinished(false);
156 } 156 }
157 } 157 }