-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Webserver Parsing Issue #5261
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
Just looking at the source in Parsing.cpp, I see that in the old version if the type was Why that change was done will need @d-a-v . Possibly related to Alexa sending illegal HTTP and us trying to accept it... |
This time http request is displayed in debug mode so we can see it in logs. |
Your PR works amazing. Now parsing has been solved! Thanks a lot 👍 Now, we need to test Alexa. @Jason2866, @reloxx13 Please, can you test Alexa again but with @d-a-v's PR? Thanks. |
@d-a-v Just tried latest commit. Alexa isnt working anymore with this :-( |
@Jason2866 Can you attach a debug log for @d-a-v on a failing connection? There's obviously something very subtle going on here. |
|
|
Can Alexa use the second key ? |
@d-a-v |
I was mentioning the Alexa code/library using core's WebServer, is it using only the first resulted key/value pair ? |
its this line i think:
|
Thanks. |
im an right that WebServer->args() are 2 now and not 1 ? that way the "if args() == 1" wont match ? WAS (my old workign log): |
That's the purpose of this PR serving old behaviour and Alexa workaround too. |
What about replacing your (alexa)
by
? |
@d-a-v With last changes in your PR, parsing works fine. Just missing the Alexa Test. @Jason2866 @reloxx13 Please, Can you test that? Thanks again. |
@d-a-v @ascillato @reloxx13
|
I consider my old PR to be foolproove in regards to this...maybe someone might want to check it again. Its simple yet effective. |
Hi, With the actual version of the core (22-oct-2018) all webserver parsings has stopped to work. Sorry. Using the PR #5262 with the first changes, the webserver parsing was fixed, but now with the recent commits in it, the parsing stop to work again. The core at commit d742df8 all webserver parsings were working. And if adding the PR #5222 also works the phillips hue emulation, used by Alexa. |
Hi, I have tested that just reverting the commit 64dd492 all the webserver parsings start to work again. I propose to revert the referenced commit and to add the PR #5222, as to make the core work again without braking the compatibility with other projects as some users start to complain (comment). And then, do the D-A-V's optimizing rework of the webparsing but from a working esp8266 core. I will be glad to help testing. Hope this helps to solve the actual webserver parsing issue. |
@ascillato regarding replacing arg(0) with arg("plain") it would be a problem for code like:
but that could be rewritten too... So in short, I could workaround it hoping no-one wants to use "plain" as a real argument. |
This is a fair request. @devyte @earlephilhower what do you think of merging #5262 now ? |
@arendst @ascillato @reloxx13 @Monarch73 @dragondaud The alexa issue arose with several different PRoposals to fix it. Current maintainers (we are currently only three volunteers, that's pretty low) are not the authors of the current webserver code that you are using. The reason why we did not merge those PRs is because we could not deeply understand them: either inefficient (duplicate content) or with unknown side effects. I personally watched them several times. We were not ready to take the responsibility for breaking things and we had more urgent fixes for the core stability. Webserver's api gives url arguments and header by name and index. Let's take an example with a url like this:
or (2)
So you (users of webserver) are using
This is my current #5262 and also one of your PRs. I will pursue #5262 to break things again because, as @reloxx13 told me, it is just inefficient to do that way. content must not be in arguments, and must not be duplicated into two argument entries. Breaking things is not good, and that's the reason of #5269.
would become something like
The new api would be #5262 successor.
This is not a big change, but I think it will put things a bit more right. |
Now with last version all works fine. Thanks a lot for your help !!!!! It is very appreciated. You have done a great job !!!! Thanks :) 👍 |
Basic Infos
Platform
Settings in IDE
Problem Description
In the last core (18-oct-2018) several changes were introduced to solve the parsing issue for Alexa and others, (Thanks a lot for that 👍, very appreciated) but a new problem has been introduced.
Tasmota uses Javascript in the Timers Config Webpage to allow the user to select times, days, etc. If using the core from 6-oct-2018, this Config Webpage is working fine, but using the last stage core, it does not work. The menu is being shown by the web browser and you can interact with it, but the parameters are not being saved, so are not being passed to Tasmota.
Debug has been enabled for both cores and also the Tasmota debug for the files attached. You can see that the amount of parameters were taking into account in the old core but in the new core are being ignored and passed as a plain text.
For the test in both core, the same sequence was done in the Tasmota webmenu.
In the last core, when hitting save, the page get reloaded and started over because no parameter is sent to Tasmota.
MCVE Sketch
https://github.com/arendst/Sonoff-Tasmota
Debug Messages
Attached are the full debugs from core stage 6 oct 2018 (works fine) and core stage 18 oct 2018 (does not work).
6oct core - working.txt
last core - dont work.txt
The text was updated successfully, but these errors were encountered: