Actions
Bug #14009
openHttp::Client not handling redirect (302) on ssl stream truncated error
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/25/2025
Due date:
% Done:
0%
Estimated time:
Description
Hello,
I have setup a Wt::Http::Client
using setFollowRedirect(true)
.
However, the done callback is called without following the redirection:
MyCallbackClientDone(Wt::AsioWrapper::error_code ec, const Wt::Http::Message& msg)
{
std::cout << "Client done. ec = " << ec.category().name() << " - " << ec.message() << " (" << ec.value() << "), status = " << msg.status();
}
=>
Client done. ec = asio.ssl.stream - stream truncated (1), status = 302
According to Wt's Client::handleRedirect
, it is likely we don't enter the if because of !err
if (!err && (((status == STATUS_MOVED_PERMANENTLY ||
status == STATUS_FOUND ||
status == STATUS_TEMPORARY_REDIRECT) && method == Http::Method::Get) ||
What do you think? Is there any workaround?
No data to display
Actions