This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 2732886 refactor, document
2732886 is described below
commit 2732886987257f18058ab021ca68c44b3fb1e987
Author: Daniel Gruno <[email protected]>
AuthorDate: Mon Nov 29 19:17:56 2021 +0100
refactor, document
---
server/plugins/formdata.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/server/plugins/formdata.py b/server/plugins/formdata.py
index 67ede3c..293a9e3 100644
--- a/server/plugins/formdata.py
+++ b/server/plugins/formdata.py
@@ -30,10 +30,9 @@ ERRONEOUS_PAYLOAD = "Erroneous payload received"
async def parse_formdata(body_type, request: aiohttp.web.BaseRequest) -> dict:
- indata = {}
- # Do we have query string arguments?
- for key, val in request.query.items():
- indata[key] = val
+ # Start with query string data for seeding our data dictionary
+ indata = {k: v for k, v in request.query.items()}
+
# PUT/POST form data?
if request.method in ["PUT", "POST"]:
if request.can_read_body: