summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorAriel Manzur <ariel@okamstudio.com>2016-02-19 17:12:16 -0300
committerAriel Manzur <ariel@okamstudio.com>2016-02-19 17:13:29 -0300
commitcc7cca55b0a845aaac7be27265cb76ab60b7c504 (patch)
treeb7eedae2a3a5c4add89a1212d69b2ab01902a0e8 /core/io
parent5e36ae3bb6bc2a5670d217e03f011f209b7c9890 (diff)
adds original http headers to response_headers
Diffstat (limited to 'core/io')
-rw-r--r--core/io/http_client.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 1be3290e41..b070e52f0a 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -306,8 +306,8 @@ Error HTTPClient::poll(){
for(int i=0;i<responses.size();i++) {
- String s = responses[i].strip_edges();
- s = s.to_lower();
+ String header = responses[i].strip_edges();
+ String s = header.to_lower();
if (s.length()==0)
continue;
if (s.begins_with("content-length:")) {
@@ -316,7 +316,7 @@ Error HTTPClient::poll(){
}
if (s.begins_with("transfer-encoding:")) {
- String encoding = s.substr(s.find(":")+1,s.length()).strip_edges();
+ String encoding = header.substr(header.find(":")+1,header.length()).strip_edges();
//print_line("TRANSFER ENCODING: "+encoding);
if (encoding=="chunked") {
chunked=true;
@@ -330,7 +330,7 @@ Error HTTPClient::poll(){
response_num=num.to_int();
} else {
- response_headers.push_back(responses[i].strip_edges());
+ response_headers.push_back(header);
}
}