Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch handleWiFi to chunkedResponse #1319

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bwjohns4
Copy link

This is actually my first PR, hopefully I'm doing this correctly. I was using a lot of parameters and sometimes they were getting dumped out of the response in handleWiFi(). This is how I fixed the issue.

@bwjohns4
Copy link
Author

I modified this to use the underlying functions within chunkedResponseModeStart() and chunkedResponseFinalize() which appear to also be in the ESP32 webserver. The ESP32 library also has the sendContent() functions, only in ESP8266 there is the extra start and finalize functions. I haven't tested this yet, but it should be a 1 for 1 swap as far as functionality goes.

@tablatronix
Copy link
Collaborator

tablatronix commented Jan 23, 2022

Thanks!, I started working on this, you beat me to it.

I was wondering if most of this was actually skipping the string append for paramsout instead of chunked.

Another option would be to switch the few functions to append &ref

@tablatronix
Copy link
Collaborator

tablatronix commented Jan 23, 2022

can you if you get a chance add
page += getParamOut(); back and see if this still works?

I need to build a large param test for myself

@tablatronix
Copy link
Collaborator

I made a branch, using page refs and chunked is turned off, curious if it also works
https://github.com/tzapu/WiFiManager/tree/feature_pagestringsref

@tablatronix
Copy link
Collaborator

tablatronix commented Feb 19, 2022

@bwjohns4 have you had a chance to test this branch to see if this also works ( instead of chunked?)

Or do you have an example I can test, or do I just need to use large params or many?

@tablatronix
Copy link
Collaborator

bump ,wondering if you tested this test branch to see if it helps instead

@bwjohns4
Copy link
Author

bwjohns4 commented May 9, 2022

@tablatronix , this looks like it should work for the problem I experienced. I was just using lots of parameters with some of them being custom_html (which took a fair bit of memory just on its own) so I had to send them chunked. I was using around 46 parameters total (20 that were just HTML text chunks).

@laurivosandi
Copy link

laurivosandi commented Apr 29, 2024

I also need to load large parameters (combobox with timezones) and I can't seem to get it working reliably (form elements missing altogether without any errors on serial). Does chunked transfer address this issue? Perhaps it would make sense to have framework for loading JS assets to the browser separately?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants