We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 4c2bc465 authored by Stephen Paul Weber's avatar Stephen Paul Weber

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.
parent 0ba53edd
......@@ -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