Zigma
February 16, 2015, 10:10am
1
I want to send the entire HTTP POST data while doing smack-bosh as compressed
as per the code https://github.com/igniterealtime/jbosh/blob/master/src/main/java/org/ignitereal time/jbosh/ApacheHTTPResponse.java
line number 153 post.setHeader(ACCEPT_ENCODING, ACCEPT_ENCODING_VAL);
The entire POST data is encoded,
Will openfire accept such HTTP request?
Is there any plugin or settings in openfire does enable this option?
Zigma
February 18, 2015, 1:01pm
2
It seems only CompressedResponseWrapper is programmed
but we can also program CompressedRequestWrapper
that will complete the entire request+response compression/decompression
CSH
February 18, 2015, 1:09pm
3
AFAIK Openfire does not support HTTP compression, because it never returns a
Content-Encoding: gzip
header in its responses.
Also, CompressedResponseWrapper is a class from Jetty, not Openfire, so it would be Jetty’s responsibility to provide a counter part CompressedRequestWrapper class.
Zigma
February 18, 2015, 1:36pm
4
As per the code
https://github.com/igniterealtime/Openfire/blob/master/src/java/org/jivesoftware /openfire/http/HttpBindManager.java
Line number 551 the jetty GzipFilter is already being programmed inside our openfire code
which is giving response Content-Encoding: gzip if I pass that same from a java http client
Yes, as you told org.eclipse.jetty.servlets.GzipFilter is a class from Jetty and it seems there is no counter part
CSH
February 18, 2015, 1:43pm
5
Ah interesting, seems like you have to explicitly enable it somehow as per this comment:
// Compression “disabled” by default; use “optional” to enable compression (restart required)
// When enabled, http response will be compressed if the http request includes an
// “Accept” header with a value of “gzip” and/or “deflate”