Tuesday, November 4, 2008

New default configuration in PLT Web Server

I recently changed the default configuration in the PLT Scheme Web Server to allow servlets at any URL, rather than only inside of the "servlets/" sub-directory. One of the mistakes that I made in testing was to not close my browser or flush its cache. Matthew sent me an email this morning letting me know that it was trying to serve the PLT logo as if it were a servlet. Fixing this problem was not as simple as adding a filter to only consider URLs that end in ss or scm, because a common thing in Web apps is to add additional information in the URL, such as "view.ss/that-table". Instead, I created a new function in web-server/dispatchers/filesystem-map called filter-url->path that filters the result of the function that extracts the longest URL that points to a valid file. I just committed the change to SVN with the beautiful revision number 12233.

0 comments: