Index: cms/bin/test_server.py |
diff --git a/cms/bin/test_server.py b/cms/bin/test_server.py |
index aa39fc49de6ea209ea4e2f58326edc16706825ee..0d5593e30b329bc89aff4ea595fe6a434f908982 100644 |
--- a/cms/bin/test_server.py |
+++ b/cms/bin/test_server.py |
@@ -101,6 +101,14 @@ def show_error(start_response, status, **kwargs): |
def handler(environ, start_response): |
path = environ.get("PATH_INFO") |
+ # First check for a relevant URL handler in sitescripts |
+ try: |
+ from sitescripts.web import get_handler |
+ return get_handler(path)(environ, start_response) |
+ except (KeyError, ImportError): |
+ pass |
+ |
+ # Otherwise serve a static file / page |
data = get_data(path) |
if data is None: |
return show_error(start_response, "404 Not Found", uri=path) |