Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
add check for failed redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Betty committed Dec 14, 2021
1 parent e828339 commit 623e73f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/login.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ unique_ptr<httplib::Client> login(const string_view src_url, optional<string_vie
auto location=res->get_header_value("Location");
if (location.empty())
{
SPDLOG_DEBUG("failed to get the redirect-location");
SPDLOG_ERROR("failed to get the redirect-location");
return{};
}
tie(host, path) = url_parse(res->get_header_value("Location"));
SPDLOG_DEBUG("redirect host:{} path:{}",host, path);
Expand Down

0 comments on commit 623e73f

Please sign in to comment.