-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WebServer::args() ignores empty parameters #6759
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
Comments
@PilnyTomas - Would you like to test it and investigate this issue? Let me know. |
Hi @tsctrl, please modify the sketch to be complete - i.e. when I copy-paste it into Arduino IDE it will compile. |
edited as per request and will compile |
A web server needs some connection, there is no web connection in the provided sketch, and it crashes on startup. Complete = compiles and starts properly after copy-paste (only change needed in code relates to SSID+PWD) |
updated with a complete and minimal sketch. does not require ssid and password |
Can you please explain how did you manage to get working ETHernet on a bare ESP32 DevKitC?
Please provide an example that is able to reproduce your issue with all other needed steps to reproduce. |
The real question of this issue is:
This related to |
@SuGlider, I created my own code and if the argument has an equal sign it works ok every time. I think this problem is due to poor documentation - users don't know what to expect. |
The URL may have a Query string which starts after "?" symbol as this general format: The syntax of the Query is not specified in the RFC 3986. The question here is if the For instance:
So, I think that we have an issue here, as presented by @tsctrl |
thanks @PilnyTomas , @SuGlider webserver prerequisite a value for a key to count it as a valid args. personally, url?query&example looks and sound better than adding url?query=""&example="" in the browser address bar. |
Hi, @tsctrl I agree. We might add support for an empty parameter in the future, but I don't want to promise anything right now. We will discuss it internally... |
Adding feature request label, we will evaluate this soon. |
Other option to be consider is to refactor whole WebServer to use ESP-IDF solution. |
Removing this issue from 2.0.4 and adding it under 2.1.0 milestone as WebServer needs more investigation. |
Same issue here. No = means no arg. example works 8266, doesent work esp32: esp32 needs: |
Ow! I just spent the last half hour trying to figure out wtf was going on here. I want to send a simple /url?SomeCommand, which is parsed elsehwere (and used by serial connexion). I figured out I need to send command=value and then conctenate them back together for parsing! lol. Can we please get this working! |
This has still not been resolved. Need help? |
Hi, I could probably fix it with the code below. See WebServer::_parseArguments(String data) (in Parsing.cpp) rewrite
to
|
Hello, Due to the overwhelming volume of issues currently being addressed, we have decided to close the previously received tickets. If you still require assistance or if the issue persists, please don't hesitate to reopen the ticket. Thanks. |
Board
ESP32 Dev Module
Device Description
DevKitC
Hardware Configuration
Version
v2.0.3
IDE Name
IDF Component, Arduino IDE
Operating System
Windows 10
Flash frequency
40MHz
PSRAM enabled
no
Upload speed
115200
Description
WebServer args() return wrong count if params is without equal= value
to reproduce use uri/?query as url to handle
refer example sketch as below. is this is valid result? opposite with
ESPAsyncWebServer libs request.params() count without equal= after ? as +1
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: