made headers case insensitive
This commit is contained in:
parent
cbab728049
commit
3db379376f
1 changed files with 3 additions and 2 deletions
|
@ -307,14 +307,15 @@ Error HTTPClient::poll(){
|
||||||
for(int i=0;i<responses.size();i++) {
|
for(int i=0;i<responses.size();i++) {
|
||||||
|
|
||||||
String s = responses[i].strip_edges();
|
String s = responses[i].strip_edges();
|
||||||
|
s = s.to_lower();
|
||||||
if (s.length()==0)
|
if (s.length()==0)
|
||||||
continue;
|
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_size = s.substr(s.find(":")+1,s.length()).strip_edges().to_int();
|
||||||
body_left=body_size;
|
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();
|
String encoding = s.substr(s.find(":")+1,s.length()).strip_edges();
|
||||||
//print_line("TRANSFER ENCODING: "+encoding);
|
//print_line("TRANSFER ENCODING: "+encoding);
|
||||||
if (encoding=="chunked") {
|
if (encoding=="chunked") {
|
||||||
|
|
Loading…
Reference in a new issue