| 633 | imagesDirName("server") {} |
| 634 | |
| 635 | void load() |
| 636 | { |
| 637 | const string imagesDir = path::join(os::getcwd(), imagesDirName); |
| 638 | |
| 639 | Try<list<string>> imageBundles = os::ls(imagesDir); |
| 640 | ASSERT_SOME(imageBundles); |
| 641 | |
| 642 | foreach (const string& imageName, imageBundles.get()) { |
| 643 | route("/" + imageName, None(), &TestAppcImageServer::serveRequest); |
| 644 | } |
| 645 | } |
| 646 | |
| 647 | Future<http::Response> serveRequest(const http::Request& request) |
| 648 | { |