Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.webServer.wsfMasterControl
on wsfMasterControl (pta) { <<Changes <<12/18/01; 9:01:28 AM by DW <<Respect user.radio.prefs.flLegacyUrlRedirects. <<12/15/01; 8:52:33 AM by DW <<Where do you want to go today? <<Called from webserver.responders.websiteFramework.methods.any <<We're doing something nice for 7.0.1 users with bookmarks pointing to pages in the 7.0.1 desktop website -- we're redirecting to their new locations in 7.1. This was a major dealstopper braincell burner for a few of our beta-testers. Why make them learn new urls when no one pays attention to them anyway? if user.radio.prefs.flLegacyUrlRedirects { //redirect URLs that worked in 7.0.1 local (path = string.urlDecode (pta^.path)); local (adrlegacy = @radio.data.legacyRedirects.[path]); if defined (adrlegacy^) { //let's make it work! local (url = radio.data.systemUrls.[adrlegacy^]); pta^.code = 302; //non-permanent redirect pta^.responseBody = webserver.util.buildErrorPage ("302 FOUND", "Found the page."); pta^.responseHeaders.location = url; pta^.responseHeaders.URI = url; try {delete (@pta^.responseHeaders.["Content-Type"])}; return (true)}}; //we've handled it, thanks for listening return (false)} //you handle it, old dude
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.