-
Notifications
You must be signed in to change notification settings - Fork 21
Sending GZIP HTML ~ 120kb+ (suggested enhancement) #3
Comments
see #4 |
@porkyneal Thanks so much for the good solution. Regards, |
@porkyneal Could you please test to see this implementation in EthernetWebServer is OK in STM32.
It's not currently implemented in STM32 (my fault). That's why you experienced the issue. |
@porkyneal Which STM32 board are you using? Many STM32 (and other) boards don't support the memcpy_P command. Could you also test the other version (I just draft, not compile / test) to use new, instead of local buffer, to allocate memory on heap.
|
@porkyneal Could you verify these mods are OK in your case. Compile OK, not yet tested:
|
Sorry, I have been away for a few days. I wont be able to test this for a day or so. From memory the current Non STM32 specific EthernetWebServer implementation did not work, it compiles, didn't crash, but no data was transferred. Again, will get on it when I back on that project. |
This happens because data is stored in PROGMEM and the original code doesn't support PROGMEM-related functions. I already fixed in the previous post to add PROGMEM functions, waiting for you to test, before commit and release new version. Certainly with your contribution credit. |
This all seems to work OK. 👍 |
Thanks. I'll merge into master then create a new release. |
Sweet, thanks. |
@porkyneal Already merged then updated the code, then release v1.0.6 Release v1.0.6
Your contribution is noted in Contributions-and-Thanks, but under the name of Aron N., not Nickname porkyneal ;-) More contributions are awaited and very welcome. Regards, |
Before I start out, would just like to say thanks for this library it has helped me very quickly port a lot of work from the ESP to the STM32 platform where I can keep both systems fairly in sync!
I also do not know if this is a generic enhancment for both this repo and the non STM32 repo, that's up to you.
I have a HTML build process using GULP which Inlines, uglifies, minifies all of my HTML, CSS and JS . The output file is a single header file that puts the entire thing into PROGMEM.
In both the ESP32 / 8266 the following is used to send this as the index:
Unforunately, this did not work with this library using the send_P command as I expected, the headers were send but no content. I have finally come up with a solution, I doubt that it is optimal, but for me it is working.
If there is a better way of doing this I would love to know, but for now I can carry on with my development, happy to offer a PR for something to work from if needed?
Now I can have my fully bootstrapped web interface that I use with my ESP devices. 👍
The text was updated successfully, but these errors were encountered: