Dolda2000 GitWeb
/
wrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
68c0eaa
)
Keep blank values in formdata.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 12 Feb 2023 14:41:51 +0000
(15:41 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 12 Feb 2023 14:41:51 +0000
(15:41 +0100)
wrw/form.py
patch
|
blob
|
blame
|
history
diff --git
a/wrw/form.py
b/wrw/form.py
index
d39d4dd
..
f821ea1
100644
(file)
--- a/
wrw/form.py
+++ b/
wrw/form.py
@@
-5,7
+5,7
@@
__all__ = ["formdata"]
def formparse(req):
buf = {}
def formparse(req):
buf = {}
- buf.update(urllib.parse.parse_qsl(req.query))
+ buf.update(urllib.parse.parse_qsl(req.query
, keep_blank_values=True
))
if req.ihead.get("Content-Type") == "application/x-www-form-urlencoded":
try:
rbody = req.input.read(2 ** 20)
if req.ihead.get("Content-Type") == "application/x-www-form-urlencoded":
try:
rbody = req.input.read(2 ** 20)
@@
-13,7
+13,7
@@
def formparse(req):
return exc
if len(rbody) >= 2 ** 20:
return ValueError("x-www-form-urlencoded data is absurdly long")
return exc
if len(rbody) >= 2 ** 20:
return ValueError("x-www-form-urlencoded data is absurdly long")
- buf.update(urllib.parse.parse_qsl(rbody.decode("latin1")))
+ buf.update(urllib.parse.parse_qsl(rbody.decode("latin1")
, keep_blank_values=True
))
return buf
class badmultipart(IOError):
return buf
class badmultipart(IOError):