diff --git a/AddressBook.cpp b/AddressBook.cpp index 0dbb42d7..5e7510a5 100644 --- a/AddressBook.cpp +++ b/AddressBook.cpp @@ -744,7 +744,6 @@ namespace client LogPrint (eLogInfo, "Addressbook: received ", m_Link, " ETag: ", m_Etag, " Last-Modified: ", m_LastModified); if (!response.eof () && !response.fail ()) { - success = true; if (!isChunked) success = ProcessResponse (response, isGzip); else diff --git a/HTTPProxy.cpp b/HTTPProxy.cpp index 056e3170..48fa0ae6 100644 --- a/HTTPProxy.cpp +++ b/HTTPProxy.cpp @@ -93,7 +93,7 @@ namespace proxy //TODO: handle this apropriately void HTTPProxyHandler::HTTPRequestFailed(/*HTTPProxyHandler::errTypes error*/) { - static std::string response = "HTTP/1.0 500 Internal Server Error\r\nContent-type: text/html\r\nContent-length: 0\r\n"; + static std::string response = "HTTP/1.0 500 Internal Server Error\r\nContent-type: text/html\r\nContent-length: 0\r\n\r\n"; boost::asio::async_write(*m_sock, boost::asio::buffer(response,response.size()), std::bind(&HTTPProxyHandler::SentHTTPFailed, shared_from_this(), std::placeholders::_1)); } @@ -122,6 +122,7 @@ namespace proxy m_address = url.host; m_port = url.port; m_path = url.path; + if (url.query.length () > 0) m_path += "?" + url.query; if (!m_port) m_port = 80; LogPrint(eLogDebug, "HTTPProxy: server: ", m_address, ", port: ", m_port, ", path: ", m_path); } diff --git a/HTTPServer.cpp b/HTTPServer.cpp index 7b7b8bcc..a48536a7 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -127,7 +127,7 @@ namespace http { "\r\n" /* TODO: Add support for locale */ " \r\n" " \r\n" /* TODO: Find something to parse html/template system. This is horrible. */ - " \r\n" + " \r\n" " Purple I2P " VERSION " Webconsole\r\n" << cssStyles << "\r\n"; @@ -136,15 +136,15 @@ namespace http { "
i2pd webconsole
\r\n" "
\r\n" "
\r\n" - " Main page
\r\n
\r\n" - " Router commands
\r\n" - " Local destinations
\r\n" - " Tunnels
\r\n" - " Transit tunnels
\r\n" - " Transports
\r\n" - " I2P tunnels
\r\n" - " Jump services
\r\n" - " SAM sessions
\r\n" + " Main page
\r\n
\r\n" + " Router commands
\r\n" + " Local destinations
\r\n" + " Tunnels
\r\n" + " Transit tunnels
\r\n" + " Transports
\r\n" + " I2P tunnels
\r\n" + " Jump services
\r\n" + " SAM sessions
\r\n" "
\r\n" "
"; } @@ -236,9 +236,9 @@ namespace http { void ShowJumpServices (std::stringstream& s, const std::string& address) { - s << "
"; + s << ""; s << ""; - s << ""; + s << ""; s << ""; s << "

\r\n"; s << "Jump services for " << address << "\r\n