Saturday, April 02, 2011 at 9:20 PM.
rssCloudSuite.notifyOneChallenge
on notifyOneChallenge (adrsubscription) { <<Changes <<10/2/09; 11:27:52 AM by DW <<Created. A special call that verifies a handler per Joseph Scott's proposal. local (adrdata = rssCloudSuite.init (), startticks = clock.ticks (), flerror = false); local (server = nameof (adrsubscription^), feedurl = nameof (parentof (adrsubscription^)^)); rssCloudSuite.initSubscription (adrsubscription); local (adrsubscriber = @adrdata^.subscribers.[server]); try { local (challenge = string.getrandompassword (20), s, code); local (testurl = server + "?url=" + string.urlencode (feedurl, true) + "&challenge=" + challenge); bundle { //make the request local (urllist); try { urllist = string.urlsplit (testurl)} else { urllist = string.urlsplit (testurl + "/")}; s = tcp.httpClient (server:urllist [2], path:urllist [3], ctFollowRedirects:3, flMessages:false); code = number (tcp.httpGetStatusCode (s)); s = string.httpresultsplit (s)}; if (code >= 200) and (code <= 299) { scratchpad.challengeResponse = s; return (s == challenge)}}; return (false)}; bundle { //test code dialog.alert (notifyOneChallenge (@config.rssCloud.subscriptions.["http://badhair.us/rss.xml"].["http://75.37.83.21:5337/river2/notify"]))}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.