diff --git a/examples/simple_compression/service_compression_execution.e b/examples/simple_compression/service_compression_execution.e index a0c95c61..908dcff6 100644 --- a/examples/simple_compression/service_compression_execution.e +++ b/examples/simple_compression/service_compression_execution.e @@ -28,17 +28,26 @@ feature {NONE} -- Initialization setup_router local - fhdl: WSF_FILE_SYSTEM_HANDLER_WITH_COMPRESSION + fhdl_with_compression: WSF_FILE_SYSTEM_HANDLER_WITH_COMPRESSION + fhdl: WSF_FILE_SYSTEM_HANDLER do + create fhdl_with_compression.make_hidden ("www") + fhdl_with_compression.set_directory_index (<<"index.html">>) + fhdl_with_compression.compression.set_default_compression_format + fhdl_with_compression.compression.enable_compression_for_media_type ({HTTP_MIME_TYPES}.image_jpg) + fhdl_with_compression.set_not_found_handler (agent (ia_uri: READABLE_STRING_8; ia_req: WSF_REQUEST; ia_res: WSF_RESPONSE) + do + execute_default (ia_req, ia_res) + end) + router.handle ("/compressed/", fhdl_with_compression, router.methods_GET) + create fhdl.make_hidden ("www") fhdl.set_directory_index (<<"index.html">>) - fhdl.set_default_compression_format - fhdl.enable_compression_for_media_type ({HTTP_MIME_TYPES}.image_jpg) fhdl.set_not_found_handler (agent (ia_uri: READABLE_STRING_8; ia_req: WSF_REQUEST; ia_res: WSF_RESPONSE) do execute_default (ia_req, ia_res) end) - router.handle_with_request_methods ("/", fhdl, router.methods_GET) + router.handle ("/", fhdl, router.methods_GET) end diff --git a/examples/simple_compression/www/index.html b/examples/simple_compression/www/index.html index bb5de796..373ccccf 100644 --- a/examples/simple_compression/www/index.html +++ b/examples/simple_compression/www/index.html @@ -7,10 +7,21 @@
This is a static html file served by EWF.
Try to get lost.
+ + +