Archive of UserLand's first discussion group, started October 5, 1998.
Using MR with WebSTAR and Pre-Processors
Author: Sam DeVore Posted: 7/28/1999; 9:29:11 PM Topic: Using MR with WebSTAR and Pre-Processors Msg #: 8861 Prev/Next: 8860 / 8862
Posted this to frontier-users and realized that it should be in a place where it will show up in a search...Hello all, So I was gleening through old info after having my head down for a while and came across Matt's (can't wait to see your influence on the docs, congrats) way of using preprocessing, cool, and I wanted to use it on my site that I will run behind WebSTAR when I get back to the school. So I was tesing it out on my machine here at home and it worked sometimes???? So in looking at the action that was coming in I discovered that sometimes it would call PREPROCESSOR (it would work here) and sometimes INDEX (no work here) and ERROR and NO-ACCESS. The first thing that I did to get it to work was to put a copy of Matt's script with my own conditions in each action that I made, not the smartest thing because then I had to remember to make any changes in all of them, Duh. So what did I do... on index became this...
on INDEX (adrparams) RETURN (user.webserver.actions.PREPROCESSOR(adrparams))you can imagine the others...Thanks Matt for a great solution to letting MainResponder (MR) handle requests to dynamic content and letting Web* doing the grunt work of tossing out the images and other things that don't need to go through MR. Cool. Please make sure you add this to the docs as you work on them, it is very usefull and POWERFUL. To use it set the PREPROCESSOR path in WebSTAR to :Frontier.acgi
Sam D.
PS. THE BOOK is still useful
pss. here is Matt's script with many conditions (is there a better way for all these conditions I'm out of control???) I attached the scripts using the suites.editorial (http://nirvana.userland.com/htmlinterfaces/nirvanaServerDiscuss/msgReader$22) I figure the index script you could write yourself....
on PREPROCESSOR (adrparams) { local (req = string.lower(adrparams^.fullrequest)); if req contains ".html" or req contains ".gif" or req contains ".jpg" or req contains ".cgi" or req contains ".acgi" or req contains ".admin" or req contains ".jar" or req contains ".java" or req contains ".count" or req contains ".mail" { return ("")}; // let WebSTAR or qpq do it local (pageTable); // the rest is out of the Nirvana action script new (tableType, @pageTable); pageTable.client = adrParams^.clientIP; pageTable.port = adrParams^.serverPort; pageTable.request = adrParams^.fullRequest; pageTable.stream = 0; if defined (adrParams^.postArgs) { if adrParams^.postArgs != "" { pageTable.request = pageTable.request + adrParams^.postArgs + "\r\n"}}; return (webserver.server (@pageTable, pageTable.request))}
There are responses to this message:
- Re: Using MR with WebSTAR and Pre-Processors, Murray Pearson, 10/14/1999; 10:42:00 PM
- Re: Using MR with WebSTAR and Pre-Processors, Matt Neuburg, 10/21/1999; 10:02:25 AM
This page was archived on 6/13/2001; 4:51:35 PM.
© Copyright 1998-2001 UserLand Software, Inc.