This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new f7a2fe04 Add guidance about the application/json media type
f7a2fe04 is described below
commit f7a2fe04b2e558b0fb66508b219ec491df8384d1
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Mar 4 20:39:33 2026 +0000
Add guidance about the application/json media type
---
atr/get/root.py | 1 +
atr/get/test.py | 1 +
atr/post/upload.py | 2 ++
3 files changed, 4 insertions(+)
diff --git a/atr/get/root.py b/atr/get/root.py
index 75be7ca9..26707ef5 100644
--- a/atr/get/root.py
+++ b/atr/get/root.py
@@ -163,6 +163,7 @@ async def resolved_json(
json_path = pathlib.Path(config.get().PROJECT_ROOT) / "atr" / "static" /
"json" / "resolved.json"
async with aiofiles.open(json_path) as f:
content = await f.read()
+ # audit_guidance The application/json media type is not defined to have a
charset parameter
return quart_response.Response(content, mimetype="application/json")
diff --git a/atr/get/test.py b/atr/get/test.py
index 99385ce2..bdd4370b 100644
--- a/atr/get/test.py
+++ b/atr/get/test.py
@@ -138,6 +138,7 @@ async def test_merge(
files.append(str(path))
result = json.dumps({"files": sorted(files)})
+ # audit_guidance The application/json media type is not defined to have a
charset parameter
return response.Response(result, status=200, mimetype="application/json")
diff --git a/atr/post/upload.py b/atr/post/upload.py
index 1a88c833..a3156677 100644
--- a/atr/post/upload.py
+++ b/atr/post/upload.py
@@ -238,10 +238,12 @@ def _construct_svn_url(committee_name: str, area:
shared.upload.SvnArea, path: s
def _json_error(message: str, status: int) -> web.WerkzeugResponse:
+ # audit_guidance The application/json media type is not defined to have a
charset parameter
return response.Response(json.dumps({"error": message}), status=status,
mimetype="application/json")
def _json_success(data: dict[str, str], status: int = 200) ->
web.WerkzeugResponse:
+ # audit_guidance The application/json media type is not defined to have a
charset parameter
return response.Response(json.dumps(data), status=status,
mimetype="application/json")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]