From 06c9e2bce2c635d31ee5e0b9755c6cad40821ecd Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 27 Feb 2018 04:34:09 +0100 Subject: [PATCH] Fixed error where the return code was 200 for successfull queries --- CMakeLists.txt | 2 +- src/http_sync.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33b6065..6b97eae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastodon-cpp - VERSION 0.4.1 + VERSION 0.4.2 LANGUAGES CXX ) diff --git a/src/http_sync.cpp b/src/http_sync.cpp index 356fb17..e9815dd 100644 --- a/src/http_sync.cpp +++ b/src/http_sync.cpp @@ -121,6 +121,7 @@ const std::uint16_t API::http::request_sync(const method &meth, { // OK or Found or Temporary Redirect // Only return body answer = answer.substr(pos + 4); + return 0; } else if (ret == 301 || ret == 308) { // Moved Permanently or Permanent Redirect