Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clarified the protocol, added a todo

  • Loading branch information...
commit 885051f4ba551242d4ca04beed82119ee4bf60d4 1 parent 1dafde9
@slact authored
Showing with 40 additions and 0 deletions.
  1. +40 −0 README
@@ -39,3 +39,43 @@ destination id is presently connected), a 202 Accepted will be sent.
It's a damn good idea to make sure the push_source location is not visible
publically, as it is intended for use only by your application.
+--- "Protocol" spec ---
+Let push_source refer to a location (or server) configured with the push_source; option.
+Let push_destination refer to a location (or server) configured with the push_destination; option.
+ Only POST requests are allowed to this location. The response will be delayed until a message
+ for the $push_id of said requests becomes available, at which point its contents will be sent
+ in the body of the response with a 200 OK status code.
+ When two requests to this location have the same $push_id, messages will be delivered to the
+ newer of the two. The older request receives an immediate response with a 409 Conflict status
+ code.
+ POST, PUT, and DELETE requests are allowed at this location.
+ A POST request will have its body ("the message"), treated as plaintext (text/plain) sent to
+ the request identified by $push_id. If no such request exists, the message will be queued
+ until it can be sent. Multiple messages can be queued, and will be received in a FILO order.
+ When the request results in an immediate sending of the message (i.e. there was a waiting
+ request identified by $push_id), the response will have a 201 Created status. If the message
+ is queued, a 202 Accepted status is sent back.
+ (NOT IMPLEMENTED YET) Requesting a PUT notifies the server to expect connections from
+ $push_id.
+ (NOT IMPLEMENTED YET) a DELETE deletes all messages intended for $push_id. If there is a waiting
+ request on push_destination identified by $push_id, it will be immediately responded to with a
+ 204 No Content status code.
+ - Implelent DELETE for push_source.
+ - Add a push_accomodate_strangers setting (presently defaulting to on). When set to off, requests
+ with a previously-unseen $push_id will be rejected.
+ - When POSTing to push_source, if Content-Type is "message/http", the response sent to $push_id
+ should be created from the body of the request.
Please sign in to comment.
Something went wrong with that request. Please try again.