@verb #80:"serve_page" this none this rxdo #789 @program #80:"serve_page" this none this "This verb is called when the web server wants to serve a page." {object, dobjstr, iobjstr} = args caller:isa($webber) && caller == player || raise(E_PERM) if (x = index(dobjstr, "?")) prepstr = dobjstr[1..x - 1] dobjstr = dobjstr[x..$] dobj = $www:parse_CGI(dobjstr) if (!dobj && dobjstr != "?") "A form with a single element called 'isindex' is special." dobj = $www:parse_CGI("?isindex=" + dobjstr[2..$]) endif else prepstr = dobjstr dobjstr = "" dobj = {} endif prepstr = this:Decode_cgi_bin(prepstr) if (`player.content_type[1..9] ! E_RANGE' == "multipart") {iobj, multipart_types} = $www:parse_multipart(iobjstr, player.multipart_boundary) player.multipart_types = multipart_types else iobj = $www:parse_CGI(iobjstr) endif for x in (this.spies) x:tell(player:title(), " now being served.") endfor if (!valid(object) || !$recycler:valid(object)) object = $www.error dobjstr = iobjstr = prepstr = "" dobj = iobj = {} elseif (prepstr == "/toolbar" && dobjstr) "Really old browsers which don't understand the client-side toolbar." return object:www_toolbar_redirect(dobjstr) endif if (prepstr && prepstr[1] in {".", ":", "!", ",", ";", "%"} || (length(prepstr) > 2 && prepstr[1..3] in {"%3A", "%21", "%2C", "%3B"})) "Show Examine page instead." $www.exam:tell_www_page(object) elseif (!object:has_callable_verb("tell_www_page")) "#1 and $garbage are special, they don't have web verbs" prepstr = ".:!" dobjstr = iobjstr = "" dobj = iobj = {} $www.exam:tell_www_page(object) else object:tell_www_page() endif `$stats:log_www() ! ANY => this.owner:tell("$stats:log_www is blowing up!")' $www.total_hits = $www.total_hits + 1 `object.www_counter = object.www_counter + 1 ! E_PROPNF' $wiz_utils:autoextend(object) "Last modified by Dax (#789) on Tue May 17 15:34:31 2005 MDT." .