Skip to content

ESP8266WebServer args() result to high? #7106

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

Closed
Stefan300381 opened this issue Feb 23, 2020 · 6 comments · Fixed by #6768
Closed

ESP8266WebServer args() result to high? #7106

Stefan300381 opened this issue Feb 23, 2020 · 6 comments · Fixed by #6768

Comments

@Stefan300381
Copy link

Stefan300381 commented Feb 23, 2020

Hi,

I'd like to understand if the following is a feature or bug:

I pass a few post parameters to a URL to set my WiFi configuration. These are:

  • WiFiSSID = a
  • WiFiPasswd = b
  • DevName = c
  • useDHCP = true

I assumed if I get the number of arguments via httpserver.args() it would return "4", but it returns "5".

The content of the last argument is:
plain=WiFiSSID=a&WiFiPasswd=b&DevName=c&useDHCP=true

In the documentation I found:

arg - get request argument value, use arg("plain") to get POST body
argName - get request argument name
args - get arguments count

So is it expected that the post body gets counted in the args() integer?

best regards

Stefan

@Stefan300381 Stefan300381 changed the title ESP8266WebServer args() result too high? ESP8266WebServer args() result to high? Feb 23, 2020
@d-a-v d-a-v self-assigned this Feb 23, 2020
@d-a-v
Copy link
Collaborator

d-a-v commented Feb 23, 2020

Would you have a chance to test #6768 ?
(see there for history on that issue)

@Stefan300381
Copy link
Author

well, if you can help me ;-)
I need to know where I can download the full package and how do install it in my PlatformIO system

@d-a-v
Copy link
Collaborator

d-a-v commented Feb 24, 2020

@devyte
Copy link
Collaborator

devyte commented Feb 24, 2020

Duplicate of #6435, closing.

@devyte devyte closed this as completed Feb 24, 2020
@Stefan300381
Copy link
Author

sorry, need some more help. I found this:

https://docs.platformio.org/en/latest/platforms/espressif8266.html#using-arduino-framework-with-staging-version

So what do I need to enter under platform_packages =
?

@d-a-v
Copy link
Collaborator

d-a-v commented Feb 25, 2020

Staging version = git master.
Here I propose to try a pull request which is not yet merged = not in git master yet.
Beside the two methods proposed above (the second is with the official arduino IDE), I can't help much. A PIO specialist may answer (or you'll have to ask them on their forum).

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

Successfully merging a pull request may close this issue.

3 participants