From: Stephen Paul Weber Date: Tue, 27 Oct 2015 03:16:39 +0000 (+0000) Subject: Accept 204 for PuSH subscription X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4c2bc465a0fe841db4942a0116f3b90989df1cf9;p=quix0rs-gnu-social.git Accept 204 for PuSH subscription Some hubs (notably, pushpress, used by wordpress.com) return 204 to mean success. This used to be allowed by the spec, so no harm in accepting it. --- diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php index d0ac83b56d..6585e9ffb7 100644 --- a/plugins/OStatus/classes/FeedSub.php +++ b/plugins/OStatus/classes/FeedSub.php @@ -355,7 +355,7 @@ class FeedSub extends Managed_DataObject $response = $client->post($hub, $headers, $post); $status = $response->getStatus(); // PuSH specificed response status code - if ($status == 202) { + if ($status == 202 || $status == 204) { common_log(LOG_INFO, __METHOD__ . ': sub req ok, awaiting verification callback'); return; } else if ($status >= 200 && $status < 300) {