From d3193c08a0c5d5c0a69236abf63d0fed7312fd39 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 11 Mar 2018 15:30:02 +0100 Subject: [PATCH] Header has to match completely in get_header() --- CMakeLists.txt | 2 +- src/mastodon-cpp.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 004b85e..15dd2d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastodon-cpp - VERSION 0.6.1 + VERSION 0.6.2 LANGUAGES CXX ) diff --git a/src/mastodon-cpp.cpp b/src/mastodon-cpp.cpp index 672e278..66ca998 100644 --- a/src/mastodon-cpp.cpp +++ b/src/mastodon-cpp.cpp @@ -251,7 +251,7 @@ const string API::get_header(const std::string &header) const { string headers; _http.get_headers(headers); - size_t startpos = headers.find(header); + size_t startpos = headers.find(header + ':'); if (startpos != std::string::npos) { startpos = headers.find(':', startpos) + 2;