diff options
Diffstat (limited to 'Swiften/Network/BOSHConnection.cpp')
-rw-r--r-- | Swiften/Network/BOSHConnection.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index 73f8ed6..4741549 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp @@ -101,8 +101,12 @@ std::pair<SafeByteArray, size_t> BOSHConnection::createHTTPRequest(const SafeByt size = safeContent.size(); - header << "POST /" << boshURL.getPath() << " HTTP/1.1\r\n" - << "Host: " << boshURL.getHost() << ":" << boshURL.getPort() << "\r\n" + header << "POST " << boshURL.getPath() << " HTTP/1.1\r\n" + << "Host: " << boshURL.getHost(); + if (boshURL.getPort()) { + header << ":" << *boshURL.getPort(); + } + header << "\r\n" /*<< "Accept-Encoding: deflate\r\n"*/ << "Content-Type: text/xml; charset=utf-8\r\n" << "Content-Length: " << size << "\r\n\r\n"; |