summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/http_client.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 4aa180ec77..19a7286dcf 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -307,14 +307,15 @@ Error HTTPClient::poll(){
for(int i=0;i<responses.size();i++) {
String s = responses[i].strip_edges();
+ s = s.to_lower();
if (s.length()==0)
continue;
- if (s.begins_with("Content-Length:")) {
+ if (s.begins_with("content-length:")) {
body_size = s.substr(s.find(":")+1,s.length()).strip_edges().to_int();
body_left=body_size;
}
- if (s.begins_with("Transfer-Encoding:")) {
+ if (s.begins_with("transfer-encoding:")) {
String encoding = s.substr(s.find(":")+1,s.length()).strip_edges();
//print_line("TRANSFER ENCODING: "+encoding);
if (encoding=="chunked") {