Chat freely about anything...

User avatar
By Henning
#72634 Hello,
this is just an information. I`m not sure that I use the latest esp8266WebServer software, may be this problem is already fixed, then ignore my post, please.
Formely I used only Firefox an IE to connect to my ESP-Modules. Now I tried it with the Microsoft Edge-Browser and got some Problems. I implemented a file-upload working fine with all my browsers but not with the Edge. After spending several hours I figured out that the the Edge Browser is sending the Header keyword "content-Type" in lower case ... but the esp8266WebServer is expecting the keyword in the form "Content-Type".
After the following modification in Parsing.cpp my file-upload is working now with Edge :

Code: Select all      if (headerName == "Content-Type" || headerName == "content-type" ){  // CHANGED
        if (headerValue.startsWith("text/plain")){
          isForm = false;
        } else if (headerValue.startsWith("multipart/form-data")){
          boundaryStr = headerValue.substring(headerValue.indexOf('=')+1);
          isForm = true;
        }
      } else if (headerName == "Content-Length"){
        contentLength = headerValue.toInt();
      } else if (headerName == "Host"){
        _hostHeader = headerValue;
      }
    }


friendly regards
Henning
User avatar
By Henning
#72637 Yes, rudy, you are absolutely right! When I google for Parsing.cpp I can find a newer version.

Actually I installed the 2.3.0 package on my Arduino IDE. This is recommended on https://github.com/esp8266/Arduino in section "Installing with Boards Manager" Can it be, that the whole stuff I`m using is obsolete ? How can I update my Arduino-IDE to the real latest version ? I`m completly irritated ...