如何配置RAD Server以发送压缩响应?

huangapple go评论60阅读模式
英文:

How to configure RAD Server to send compressed responses?

问题

我正在使用RAD Server构建一个新的C/S应用程序原型。

我想要压缩一些大请求以加快它们的传输速度,所以我将它们发送到Header上的Accept-Encodinggzip,如此处所解释的一样,用于通用REST服务器:

https://www.developer-experts.net/en/2018/10/12/better-performance-with-rest-compression/

但是我的RAD Server仍然以纯文本形式提供这些请求。我是否需要在服务器端自己检查Accept-Encoding Header并压缩这些响应?

《Embarcadero RAD Server完全指南电子书》中没有提到gzip、Accept-Encoding、压缩等内容,我也找不到关于压缩RAD Server请求的其他文档,因此我不知道问题是我需要自己编写压缩代码,还是需要配置RAD Server以响应接收到的Accept-Encoding。

英文:

I'm building a prototype for a new C/S app using RAD Server.

I want to get compressed some large requests to speed up their transmission, so I send them with Accept-Encoding to gzip on their Header, as explained here for generic REST servers:

https://www.developer-experts.net/en/2018/10/12/better-performance-with-rest-compression/

But my RAD Server still serves those requests in plain text. Do I have to check myself the Accept-Encoding Header on the server side and compress those responses ?

The "The Complete Guide to Embarcadero RAD Server eBook" doesn't have any mentions to gzip, Accept-Encoding, Compression, ... and I haven't been able to find any other documentation about compressing RAD Server requests, so I don't know if the problem is that I have to program that compression myself or I need to configure RAD Server so it reacts to the Accept-Encoding received.

答案1

得分: 1

在生产环境中,RAD Server应该在可以配置压缩的Web服务器上运行。在开发和测试时,独立运行RAD Server只是为了方便。IIS和Apache都有设置来压缩RAD Server生成的动态内容。

英文:

In production RAD Server should be running on a Web Server which can be configured to do the compression if desired. Running RAD Server standalone is really just for convenience while doing development and testing.

Both IIS and Apache have settings to compress dynamic content like what RAD Server generates.

huangapple
  • 本文由 发表于 2023年5月29日 16:59:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76355952.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定