jczic / MicroWebSrv

A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)
https://github.com/jczic/MicroWebSrv
MIT License
641 stars 116 forks source link

Use unquote_plus() to get correct request arguments #29

Closed JK-de closed 6 years ago

JK-de commented 6 years ago

On typing "a b" in a form <input> the argument arrives at handler with "a+b" The '+' is a symbol for space while transport and should be replaced on reading header lines.

If you type in the form element:

[a b]

you get with actual version a HTTP-GET or HTTP-POST:

"<addr>/?k=a+b"

you get a dict with:

{'k': 'a+b'}

With this change you get a correct dict with:

{'k': 'a b'}

jczic commented 6 years ago

Yes exactly :) Thanks !

petrkr commented 4 years ago

This issue appeared again. Was introduced back by commit 8a2130df7a132ee9190018415dfa0c72f2d9f973