Currently when Crunchy retrieves a local or remote file, this works like that:
1.a The file is in html (no preprocessor needed): Crunchy open it (if it's
remote, this can includes mechanisms like the forward of Accept-Language
headers).
1.b The file need to be parsed by a preprocessor: Crunchy give the path/url
of the file to the preprocessor, and get the result as an open file in html.
2. The VLAM inside the html file is interpreted by Crunchy.
In 1.b, the preprocessor need to have its own way to get local or remote
files. Features like the forward of Accept-Language (or the support of a
newer protocol...) need to be rewrite.
I suggest a change in the architecture of preprocessors to let them act
like a kind of pipe: they get an open file and return another one. This
should work like:
1. Crunchy open the (remote/local/...) file
2. If the work of a preprocessor is needed, pass the open file to the
preprocessor. It return another open file, in html.
3. Crunchy interprets the html.
Another way should be to have a common module to open file. This module
should be available for all plugins. But this seems to be redundant with
existing handle_* plugins, and IMHO it's not really the best way.
Original issue reported on code.google.com by florian....@gmail.com on 28 Jun 2008 at 4:11
Original issue reported on code.google.com by
florian....@gmail.com
on 28 Jun 2008 at 4:11