Problems with POST response...

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
jedie
Posts: 252
Joined: Fri Jan 29, 2016 12:32 pm
Contact:

Problems with POST response...

Post by jedie » Mon Dec 23, 2019 9:42 am

I have problems with POST responses using uasyncio.start_server() on ESP8266 with MicroPython v1.12:

This is easy to reproduce with this test server script: https://github.com/jedie/micropython-so ... bserver.py
Screenshot_2019-12-23 Minimal MicroPython Webserver.png
Screenshot_2019-12-23 Minimal MicroPython Webserver.png (45.76 KiB) Viewed 1621 times
Submit via "GET test form" will always work.

But using the "POST test form" will work often, but not always. On console i didn't see any errors. Every request will be ended normally.
In a case of an error, i see a "blank" page in firefox. In debug toolbar i see that the device didn't send a response.

Every request will end with await writer.aclose()
Something like writer.drain() or writer.wait_closed() as in CPython doesn't exists. So i assume that await writer.aclose() is enough, right?

Any idea?

Post Reply