Header has to match completely in get_header()
This commit is contained in:
parent
d59f24b97c
commit
d3193c08a0
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required (VERSION 3.7)
|
||||
project (mastodon-cpp
|
||||
VERSION 0.6.1
|
||||
VERSION 0.6.2
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user