Rychard / CityWebServer

Integrated Web Server for Cities: Skylines
58 stars 21 forks source link

add StaticResponseFormatter for serving static files #4

Closed nezroy closed 9 years ago

nezroy commented 9 years ago

This pull request adds a new response formatter to serve static files by moving the ServiceFileRequest from the IntegratedWebServer into the extensibility layer. This allows mods built on extensibility to easily serve static files in their handlers as a default/fallback.

This adds references to the Collosal/Unreal assemblies in the extensibility layer, which may not be desirable. This is only needed for moving the "GetWebRoot" to a place where other mods can use it, though. Getting rid of that relocation removes those assembly dependencies, at the drawback of each mod having to duplicate code to figure out their own static file root paths. In the current implementation, each mod needs to have a UNIQUE directory name, which is kind of dangerous anyway.

nezroy commented 9 years ago

oops, ignore this one, slightly better one to follow :)