Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Compress JSON in Content Handler



Permlink Replies: 3 - Last Post: Feb 27, 2017 8:32 AM Last Post By: Chad Hower
Sven Heuer

Posts: 22
Registered: 9/30/00
Compress JSON in Content Handler
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 26, 2017 8:57 AM
Hi,

I have written my own content handler which returns a json string. So far so good. In 14.0.46 I found that compression in SA will be enbled by default for some mime types (like json). Hmm. Is there a way to force it? The content type is set to application/json but the returned data is never compressed. Any hint?

best regards
Sven
Sven Heuer

Posts: 22
Registered: 9/30/00
Re: Compress JSON in Content Handler
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 26, 2017 11:55 PM   in response to: Sven Heuer in response to: Sven Heuer
Argh, I just found out that a proxy server in the middle was unpacking the file and send it uncompressed to the client... I will "meet" the admin ;-)

SORRY!

Sven


Sven Heuer wrote:
Hi,

I have written my own content handler which returns a json string. So far so good. In 14.0.46 I found that compression in SA will be enbled by default for some mime types (like json). Hmm. Is there a way to force it? The content type is set to application/json but the returned data is never compressed. Any hint?

best regards
Sven
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: Compress JSON in Content Handler
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 27, 2017 12:11 AM   in response to: Sven Heuer in response to: Sven Heuer
Yes, IW compresses json content.

This content is compressed by default:

text/*
application/javascript
application/x-javascript
application/json
application/xhtml
application/xml
application/xhtml+xml
application/rss+xml
image/svg+xml
Chad Hower

Posts: 613
Registered: 3/2/07
Re: Compress JSON in Content Handler
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 27, 2017 8:32 AM   in response to: Sven Heuer in response to: Sven Heuer
On 2/27/2017 3:55 AM, Sven Heuer wrote:
Argh, I just found out that a proxy server in the middle was
unpacking the file and send it uncompressed to the client... I will
"meet" the admin ;-)

Misconfigured proxies are such a PITA.....
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02