Skip to content
Snippets Groups Projects
Commit de6beed5 authored by Odilitime's avatar Odilitime
Browse files

support 302/303 redirects too

parent 01508be1
No related branches found
No related tags found
No related merge requests found
......@@ -88,11 +88,11 @@ WebResource getOnlineWebResource(URL const& url) {
request.sendRequest([&](HTTPResponse const& response){
logDebug() << "getOnlineWebResource request.sendRequest" << std::endl;
if (response.statusCode == 301) {
if (response.statusCode == 301 || response.statusCode == 302 || response.statusCode == 303) {
std::string location;
if (response.properties.find("Location")==response.properties.end()) {
if (response.properties.find("location")==response.properties.end()) {
logDebug() << "getOnlineWebResource - got 301 without a location" << std::endl;
logDebug() << "getOnlineWebResource - got " << response.statusCode << " without a location" << std::endl;
for(auto const &row : response.properties) {
logDebug() << "getOnlineWebResource - " << row.first << "=" << response.properties.at(row.first) << std::endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment