about summary refs log tree commit diff
path: root/app/controllers/activitypub
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2017-10-03 23:21:19 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-10-03 23:21:19 +0200
commitdfaa219f8820224d37cd060d253a507111c63460 (patch)
treed84960bb81f1203489ed1a7cb3f1d919b64d05d7 /app/controllers/activitypub
parente6543d5fc4d4f6ec7020d104e4d2360ee9bd7679 (diff)
Fix HTTP responses for salmon and ActivityPub inbox processing (#5200)
* Return sensible HTTP status for ActivityPub inbox processing

* Return sensible HTTP status for salmon slap processing

* Return additional information to debug signature verification failures
Diffstat (limited to 'app/controllers/activitypub')
-rw-r--r--app/controllers/activitypub/inboxes_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/activitypub/inboxes_controller.rb b/app/controllers/activitypub/inboxes_controller.rb
index d0f8073ed..76553a162 100644
--- a/app/controllers/activitypub/inboxes_controller.rb
+++ b/app/controllers/activitypub/inboxes_controller.rb
@@ -9,9 +9,9 @@ class ActivityPub::InboxesController < Api::BaseController
     if signed_request_account
       upgrade_account
       process_payload
-      head 201
-    else
       head 202
+    else
+      [signature_verification_failure_reason, 401]
     end
   end