10000 Bug fix/uaf communicator request abort by m0ppers · Pull Request #3216 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Bug fix/uaf communicator request abort #3216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix progress callback
  • Loading branch information
Andreas Streichardt committed Sep 7, 2017
commit 8868c64e7afa57304685b3298015c38b52436f0e
3 changes: 2 additions & 1 deletion lib/SimpleHttpClient/Communicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void Communicator::createRequestInProgress(NewRequest const& newRequest) {
curl_easy_setopt(handle, CURLOPT_PROXY, "");

// the xfer/progress options are only used to handle request abortions
curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 1L);
curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 0L);
curl_easy_setopt(handle, CURLOPT_XFERINFOFUNCTION, Communicator::curlProgress);
curl_easy_setopt(handle, CURLOPT_XFERINFODATA, handleInProgress->_rip.get());

Expand Down Expand Up @@ -457,6 +457,7 @@ void Communicator::handleResult(CURL* handle, CURLcode rc) {
case CURLE_ABORTED_BY_CALLBACK:
TRI_ASSERT(rip->_aborted);
rip->_callbacks._onError(TRI_COMMUNICATOR_REQUEST_ABORTED, {nullptr});
break;
default:
LOG_TOPIC(ERR, arangodb::Logger::FIXME) << "Curl return " << rc;
rip->_callbacks._onError(TRI_ERROR_INTERNAL, {nullptr});
Expand Down
2 changes: 1 addition & 1 deletion tests/SimpleHttpClient/CommunicatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
using namespace arangodb;
using namespace arangodb::communicator;

TEST_CASE( "requests are properly aborted", "[communicator]" ) {
TEST_CASE("requests are properly aborted", "[communicator]" ) {
Communicator communicator;

bool callbacksCalled = false;
Expand Down
0