One of the tasks of the PLT Web Server is to associate URLs with programs that are run to produce the results. In most Web servers, like Apache, this is done in two steps:
- Associate URLs with filesystem paths.
- Evaluate files with different prefixes using different engines, e.g.,
.htmlis static and.plis Perl.
(In other servers, like Ruby on Rails, URLs are mapped to function calls by default and there is special configuration required to get static content.)
In the past, the PLT Web Server worked like Apache: URLs were mapped to files and every file that ended with .ss or .scm was interpreted as a Scheme servlet.
Now, it is customizable! The PLT Web Server now accepts an arbitrary function mapping URLs to servlets. The old functionality is available via a pair of functions that construct ``default'' variants of this function.
This will make it easier to customize in arbitrary ways and replicate the behavior of servers like Ruby on Rails in PLT!
0 comments:
Post a Comment