我有一个程序化的 Undertow 服务器设置。静态内容也由 Undertow 提供,没有反向代理。Undertow 启动的 Java 代码如下所示:
ResourceManager resourceManager =
new FileResourceManager(new File("deploymentDir"), 100);
DeploymentInfo servletBuilder = Servlets.deployment()
.setResourceManager(resourceManager)
.setDeploymentName("testDeployment")
.setContextPath("/");
DeploymentManager manager = Servlets.defaultContainer()
.addDeployment(servletBuilder);
manager.deploy();
Undertow.Builder builder = Undertow.builder();
builder.addHttpListener(8080, domainName);
PathHandler path = Handlers.path(Handlers.redirect("/"))
.addPrefixPath("/", manager.start());
Undertow server = builder.setHandler(path).build();
server.start();
我想知道在 Undertow 中一个 gzip 服务器如何响应?
谢谢,维塔利。