Created
January 6, 2019 10:27
-
-
Save RootUp/265cfec5a13aeb7bc8350672ff386d14 to your computer and use it in GitHub Desktop.
HttpConnection.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/aria2/aria2/blob/37368130ca7de5491a75fd18a20c5c5cc641824a/src/HttpConnection.cc | |
std::string result; | |
std::string line; | |
while (getline(istr, line)) { | |
if (util::startsWith(line, "Authorization: Basic")) { | |
result += "Authorization: Basic ********\n"; | |
} | |
else if (util::startsWith(line, "Proxy-Authorization: Basic")) { | |
result += "Proxy-Authorization: Basic ********\n"; | |
} | |
.... | |
const auto& proc = outstandingHttpRequests_.front()->getHttpHeaderProcessor(); | |
if (proc->parse(socketRecvBuffer_->getBuffer(), | |
ocketRecvBuffer_->getBufferLength())) { | |
A2_LOG_INFO( | |
fmt(MSG_RECEIVE_RESPONSE, cuid_, proc->getHeaderString().c_str())); | |
auto result = proc->getResult(); | |
if (result->getStatusCode() / 100 == 1) { | |
socketRecvBuffer_->drain(proc->getLastBytesProcessed()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment