khoih-prog / WiFiWebServer

This is simple yet complete WebServer library for AVR, Portenta_H7, Teensy, SAM DUE, SAMD, STM32, RP2040-based, etc. boards running WiFi modules/shields (WiFiNINA, CYW43439, U-Blox W101, W102, etc.). The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Now using WiFiMulti_Generic library
MIT License
104 stars 21 forks source link

1400 char limit on html send (not chunking!!) #9

Closed Philwzen closed 3 years ago

Philwzen commented 3 years ago

2 problems with wifiweserver library. 1: does not serve pages if _WIFILOGLEVEL is not 4.!! gives ipaddress ERR_EMPTY_RESPONSE msg in browser 2:I get a mismatch between expected size and actual size, and page does not display. when sendiing html longer than 1400 chars.

increased esize of html send in asdvancedwebserver example.(used A String instead of char var) worked fine until lebght got over 1400 then truncates. debug msgs show correct length

html should be chunked it appears to no be. all html should be transmitted only first 1400 chars sent

arduinoide1.8.10 lastestwifewebserverlibrary latest wifi101. using mkr1000 board lastestpatch.

Philwzen commented 3 years ago

can fix no response when logging < 4 by inserting

if defined(ARDUINO_SAMD_MKR1000)

  #if defined TimeAlarms_h
    Alarm.delay(1);
  #else 
    delay(1);
  #endif
#endif

before switch statement in wifiwebserver-impl.h NOTE:Yield() DOESNOT do the trick!!?? so this is a bit of a bodge. still cannot fix 1400 char limit on mkr1000 even though it works for esp's! so maybe fault in wifi101? can see the problem with advancedweserver.ino the graph image will not display( its > 1400 char).

khoih-prog commented 3 years ago

Thanks for sharing your experience which will helps other users in dealing with WiFi101 library's issue.