Commit 45b24286 authored by mmn's avatar mmn

Merge branch 'status-204' into 'master'

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.

See merge request !48
parents f513ceac 4c2bc465
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment