Page MenuHomeSoftware Heritage

D8819.id.diff
No OneTemporary

D8819.id.diff

diff --git a/swh/web/save_origin_webhooks/generic_receiver.py b/swh/web/save_origin_webhooks/generic_receiver.py
--- a/swh/web/save_origin_webhooks/generic_receiver.py
+++ b/swh/web/save_origin_webhooks/generic_receiver.py
@@ -88,7 +88,7 @@
)
content_type = request.headers.get("Content-Type")
- if content_type != "application/json":
+ if content_type and not content_type.startswith("application/json"):
raise BadInputExc(
f"Invalid content type '{content_type}' for the POST request sent by "
f"{self.FORGE_TYPE} webhook, it should be 'application/json'."

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 17, 4:56 PM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216918

Event Timeline