-
Notifications
You must be signed in to change notification settings - Fork 7.6k
fix(wifi): correct matching requests made from browsers #9410
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
Conversation
👋 Hello pzygielo, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
3696c6c
to
fbbfc34
Compare
Check: https://www.rfc-editor.org/rfc/rfc9110.html#section-3.9 for _Example Message Exchange_.
|
Hello @pzygielo, I have tested the example, and for me it's working with both versions. With the current code and with your changes the same. Even though in the header these is another content like the HTTP, the current line is headed by each char, so at the end with your change, it will trigger the ON/FF multiple times.
We can close this PR, as it won't be probably merged. @me-no-dev |
Just to make sure - with the (real) browser? |
Yes, and what I posted is the log from the ESP32, when I added a line to print |
I'll re-try the example on my side again then. Thanks for checking. |
Yeah... that would be terrible. I can't explain/remember the error I was getting initially (in January). But I confirm that now (w/o my change it is), on the next try - everything works as expected with both examples. 🎉 |
Description of Change
I propose to change matching the request line to determine if it is
GET
forH
orL
.Tests scenarios
With example running - when accessed via HTTP client - currently the request is not recognized as
GET /(H|L)
due to additional content in line (like HTTP protocol version) following the method.With this fix it's possible to interact with the example as advertised:
arduino-esp32/libraries/WiFi/examples/SimpleWiFiServer/SimpleWiFiServer.ino
Line 6 in f9bb62a
Related links