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
This commit is contained in:
commit
45b24286e5
|
@ -355,7 +355,7 @@ class FeedSub extends Managed_DataObject
|
||||||
$response = $client->post($hub, $headers, $post);
|
$response = $client->post($hub, $headers, $post);
|
||||||
$status = $response->getStatus();
|
$status = $response->getStatus();
|
||||||
// PuSH specificed response status code
|
// PuSH specificed response status code
|
||||||
if ($status == 202) {
|
if ($status == 202 || $status == 204) {
|
||||||
common_log(LOG_INFO, __METHOD__ . ': sub req ok, awaiting verification callback');
|
common_log(LOG_INFO, __METHOD__ . ': sub req ok, awaiting verification callback');
|
||||||
return;
|
return;
|
||||||
} else if ($status >= 200 && $status < 300) {
|
} else if ($status >= 200 && $status < 300) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user