MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / SendRedirect

Method SendRedirect

libi2pd_client/HTTPProxy.cpp:217–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215 }
216
217 void HTTPReqHandler::SendRedirect(const std::string& address)
218 {
219 i2p::http::HTTPRes res;
220 res.code = 302;
221 res.add_header("Location", address);
222 res.add_header("Connection", "close");
223 m_Response = res.to_string();
224 boost::asio::async_write(*m_sock, boost::asio::buffer(m_Response), boost::asio::transfer_all(),
225 std::bind(&HTTPReqHandler::SentHTTPFailed, shared_from_this(), std::placeholders::_1));
226 }
227
228 bool HTTPReqHandler::ExtractAddressHelper(i2p::http::URL& url, std::string& jump, bool& confirm)
229 {

Callers

nothing calls this directly

Calls 2

add_headerMethod · 0.80
to_stringMethod · 0.80

Tested by

no test coverage detected