diff sat/plugins/plugin_comp_ap_gateway/http_server.py @ 4005:54a6b44f173b

component AP gateway: reset stream position after getting payload: the stream position needs to be reset, as the body may be read again to compute signature hash.
author Goffi <goffi@goffi.org>
date Thu, 16 Mar 2023 12:28:52 +0100
parents 7a6c7abd7dbb
children 48e8b3dba793
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_ap_gateway/http_server.py	Fri Mar 10 17:22:45 2023 +0100
+++ b/sat/plugins/plugin_comp_ap_gateway/http_server.py	Thu Mar 16 12:28:52 2023 +0100
@@ -1042,6 +1042,9 @@
             )
             request.finish()
             return
+        else:
+            request.content.seek(0)
+
         try:
             if data["type"] == "Delete" and data["actor"] == data["object"]:
                 # we don't handle actor deletion