made headers case insensitive
This commit is contained in:
parent
cbab728049
commit
3db379376f
|
@ -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") {
|
||||
|
|
Loading…
Reference in New Issue