Johan Solve wrote on 6/7/2007 6:27 AM: > I agree that this needs to be improved somehow, but I'm not sure how... Suggestions are welcome.
Below is the code I use within my projects, perhaps it can be adapted for Knop. It runs within the context It tries to find a index.lasso file (or a permutation), if it can't find one, it assumes the path is virtual and has a place to handle that. It then overloads the response_filepath with either the found index.lasso file or the file that should handle the virtual path.
Any tag prefaced by lp_ is a ctag that you can grab here:
var:'response_filepath' = response_filepath; // store overloaded response_filepath
// first see if we have an index.lasso, or default.lasso, etc. local:'index_filenames' = (array:'index','default'); local:'index_fileexts' = (array:'lasso','las'); // add html, htm here if you have Lasso process them
// NOTE: if it gets here, either the url points to a real directory without an index.lasso file or a fake directory (or a fake file perhaps)
// ACTION: set $response_filepath to a real path and filename here if you use virtual paths // e.g. $response_filepath = '/config/corral.lasso'; // We overload the response_filepath tag below with that value, so continue using [response_filepath] throughout the site
// make sure loading only allowed file extensions (no .inc) if: !response_filepath->(endswith:'.lasso') && !response_filepath->(endswith:'.las') && !response_filepath->(endswith:'.lassoapp'); // probably want to log something here, maybe tell the user they are lost $__html_reply__ = 'File not allowed.'; // response_filepath; abort; /if;
]
############################################################# This message is sent to you because you are subscribed to the mailing list <knop@lists.montania.se>. To unsubscribe, E-mail to: <knop-off@lists.montania.se> Send administrative queries to <knop-request@lists.montania.se> List archive http://lists.montania.se/Lists/knop/ (log in with your email and ConfirmationID as password, send message to <knop-confirm@lists.montania.se> to get that ID) Project homepage http://montania.se/projects/knop/ AIM chatroom knop aim:gochat?roomname=knop
Jun 07
Bil Corry Re: Trapping nonexistent url
Jun 07, 2007; 08:55
Bil Corry
Re: Trapping nonexistent url
Jun 07
Jolle Carlestam Trapping nonexistent url
Jun 07, 2007; 12:13
Jolle Carlestam
Trapping nonexistent url
Jun 07
Johan Solve Re: Trapping nonexistent url
Jun 07, 2007; 15:27
Johan Solve
Re: Trapping nonexistent url
Jun 07
Jolle Carlestam Re: Trapping nonexistent url
Jun 07, 2007; 15:39
Jolle Carlestam
Re: Trapping nonexistent url
Jun 07
Johan Solve Re: Trapping nonexistent url
Jun 07, 2007; 15:51
Johan Solve
Re: Trapping nonexistent url
Jun 07
Jolle Carlestam Re: Trapping nonexistent url
Jun 07, 2007; 16:03
Jolle Carlestam
Re: Trapping nonexistent url
Jun 07
Bil Corry Re: Trapping nonexistent url
Jun 07, 2007; 16:06
Bil Corry
Re: Trapping nonexistent url
Jun 07
Jolle Carlestam Re: Trapping nonexistent url
Jun 07, 2007; 16:14
Jolle Carlestam
Re: Trapping nonexistent url
Jun 07
Jolle Carlestam Re: Trapping nonexistent url
Jun 07, 2007; 16:27
Jolle Carlestam
Re: Trapping nonexistent url
Jun 07
Johan Solve Re: Trapping nonexistent url
Jun 07, 2007; 23:12
Johan Solve
Re: Trapping nonexistent url
Jun 07
Johan Solve Re: Trapping nonexistent url
Jun 07, 2007; 23:26
Johan Solve
Re: Trapping nonexistent url
Jun 07
Johan Solve Re: Trapping nonexistent url
Jun 07, 2007; 23:48
Johan Solve
Re: Trapping nonexistent url
Jun 07
Jolle Carlestam Re: Trapping nonexistent url
Jun 07, 2007; 23:48
Jolle Carlestam
Re: Trapping nonexistent url
Jun 08
Jolle Carlestam Re: Trapping nonexistent url
Jun 08, 2007; 00:08
Jolle Carlestam
Re: Trapping nonexistent url
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!