risoflora / brookframework

Microframework which helps to develop web Pascal applications.
https://risoflora.github.io/brookframework
GNU Lesser General Public License v2.1
238 stars 54 forks source link

Easy alternative to ZSend()-like methods #6

Closed silvioprog closed 5 years ago

silvioprog commented 5 years ago

Hello,

the ZSend()-like methods aren't intuitive, so it would be nice some algorithm which could decide automatically to compress the response based in the client's Accept-Encoding header, or at least something like this:

begin
  AResponse.Compressed := True;
  AResponse.Send(... Params ...);
...

or, in a more global way:

BrookHTTPServer1.Compression := hcGzip;

Thanks!

silvioprog commented 5 years ago

Fixed in 10c3669a865fd8964bde5323973ff4a6b86ba168.