Fix Wget redirects.
GitOrigin-RevId: da827d06832793592f2c8c47e7510922da776333
This commit is contained in:
parent
d9a89abd23
commit
0c1d797753
@ -95,7 +95,9 @@ void Wget::on_connection_error(Status error) {
|
||||
|
||||
void Wget::on_ok(HttpQueryPtr http_query_ptr) {
|
||||
CHECK(promise_);
|
||||
if (http_query_ptr->code_ == 302 && ttl_ > 0) {
|
||||
if ((http_query_ptr->code_ == 301 || http_query_ptr->code_ == 302 || http_query_ptr->code_ == 307 ||
|
||||
http_query_ptr->code_ == 308) &&
|
||||
ttl_ > 0) {
|
||||
LOG(DEBUG) << *http_query_ptr;
|
||||
input_url_ = http_query_ptr->get_header("location").str();
|
||||
LOG(DEBUG) << input_url_;
|
||||
|
Loading…
Reference in New Issue
Block a user