Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F11023676
D8819.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
645 B
Subscribers
None
D8819.id.diff
View Options
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
Details
Attached
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
Attached To
D8819: save_origin_webhooks: Fix tests when building debian buster package
Event Timeline
Log In to Comment