 user = new User()
 
 replications = {}
+
+
+# Add https in case the protocol is not specified in the url
+addProtocol = (url) ->
+    url = "https://" + url if url?.indexOf("://") is -1
+    return url
 
 
 # Called each time a change occurs in the _replicator db

            # Avoid empty usernames
            if not params.sharerName? or (params.sharerName is '')
                params.sharerName = params.sharerUrl.replace "https://", ""
            # Send to recipient
            remote = request.createClient url
            remote.post path, params, (err, result, body) ->


# Send a revocation request to the specified url
module.exports.sendRevocation = (url, path, params, callback) ->
    # Add https if not specified
    url = addProtocol url
    remote = request.createClient url
    remote.del path, params, (err, result, body) ->
        handleNotifyResponse err, result, body, callback
