diff options
Diffstat (limited to 'scene/main/http_request.cpp')
-rw-r--r-- | scene/main/http_request.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index f649380afa..2c6cefa771 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -220,8 +220,8 @@ bool HTTPRequest::_handle_response(bool *ret_value) { client->get_response_headers(&rheaders); response_headers.resize(0); downloaded.set(0); - for (List<String>::Element *E = rheaders.front(); E; E = E->next()) { - response_headers.push_back(E->get()); + for (const String &E : rheaders) { + response_headers.push_back(E); } if (response_code == 301 || response_code == 302) { @@ -235,9 +235,9 @@ bool HTTPRequest::_handle_response(bool *ret_value) { String new_request; - for (List<String>::Element *E = rheaders.front(); E; E = E->next()) { - if (E->get().findn("Location: ") != -1) { - new_request = E->get().substr(9, E->get().length()).strip_edges(); + for (const String &E : rheaders) { + if (E.findn("Location: ") != -1) { + new_request = E.substr(9, E.length()).strip_edges(); } } |