Hi,
I think I found an issue in the web server included in CircuitPython. If you post a form back to the web server that has no input fields, OR contains only cheboxes and they all are clear (which causes no form data to be posted back), the web server seems to crash.
For example this form:
<form action="/update" method="post">
<input type="checkbox" name="test" value="1">
<input type="submit" value="Update">
</form>
When trying to access the field value (or any of the other methods):
@server.route("/update", POST)
def update(request: Request):
x = request.form_data.fields
Causes this error:
File "adafruit_httpserver/request.py", line 321, in form_data
File "adafruit_httpserver/request.py", line 144, in __init__
File "adafruit_httpserver/request.py", line 157, in _parse_x_www_form_urlencoded
ValueError: need more than 1 values to unpack
Or am I perhaps missing something?