lib/routes/uuidGet.js
function getNew(body) {
      // If we haven't already cleared the callback (we got the body, then the
      // message on the subscriber)
      if (timer) {
        // If the new body is present (say, if it wasn't deleted)
        if (body) {
          // Calculate the new Etag
          ourEtag = '"' + sha1hex(body) + '"';

          // If it's a new body (which it almost certainly should be)
          if (ourEtag != theirEtag) {
            sendNewEtagAndBody(body);
          }
          // If it's not a new body we do nothing and keep listening / waiting

        // If the new body is empty
        } else {
          // Respond that it is now Not Found
          respondNotFound();
        }
      }
    }
function getNew(body) {
      // If we haven't already cleared the callback (we got the body, then the
      // message on the subscriber)
      if (timer) {
        // If the new body is present (say, if it wasn't deleted)
        if (body) {
          // Calculate the new Etag
          ourEtag = '"' + sha1hex(body) + '"';

          // If it's a new body (which it almost certainly should be)
          if (ourEtag != theirEtag) {
            sendNewEtagAndBody(body);
          }
          // If it's not a new body we do nothing and keep listening / waiting

        // If the new body is empty
        } else {
          // Respond that it is now Not Found
          respondNotFound();
        }
      }
    }
function getNew ( body ) { // If we haven't already cleared the callback (we got the body, then the // message on the subscriber) if ( timer ) { // If the new body is present (say, if it wasn't deleted) if ( body ) { // Calculate the new Etag ourEtag = '"' + sha1hex ( body ) + '"' ; // If it's a new body (which it almost certainly should be) if ( ourEtag != theirEtag ) { sendNewEtagAndBody ( body ) ; } // If it's not a new body we do nothing and keep listening / waiting // If the new body is empty } else { // Respond that it is now Not Found respondNotFound ( ) ; } } }
Callback for when we get a mesage that there's a new body.
Callback for when we get a mesage that there s a new body .