synopse / mORMot2

OpenSource RESTful ORM/SOA/MVC Framework for Delphi and FreePascal
https://synopse.info
Other
516 stars 130 forks source link

Allow HTTP compression for JSON:API media type "application/vnd.api+json" #203

Closed rganz closed 1 year ago

rganz commented 1 year ago

JSON:API is a specification for REST/JSON and they registered the media type at IANA.

In mormot.net.http there is a whitelist which media types can be compressed or not. It can be bypassed by registering compression with aCompressMinSize = 0, but then we lose the ability to skip compression for small content size.

So please add "VND.API+JSON" to the const array "_CONTENTAPP".

If you agree, I can create a PR

synopse commented 1 year ago

Why not? You can make a PR.

synopse commented 1 year ago

Thanks for the pull request.

It is merged now. :)