0

I have a scenario where a Netty server has a GZIP'd buffer, and I'd like to send it as part of a chunked response without inflating/deflating.

By way of illustration: imagine I have three parts:

  • ChannelBuffer jsonp = "callback(",
  • ChannelBuffer gzippedData = <gzipped bytes>,
  • ChannelBuffer jsonpend = ")"

I'd like HttpContentCompressor to skip gzippedData, but handle the other chunks.

I don't see an obvious way to do this after reading the code. Suggestions?

Infinite Recursion
  • 6,511
  • 28
  • 39
  • 51
Nino Walker
  • 2,742
  • 22
  • 30

1 Answers1

1

I think you would need to have your own version of HttpContentCompressor for this. By default it will not do what you want.

Norman Maurer
  • 23,104
  • 2
  • 33
  • 31
  • Interesting link: http://stackoverflow.com/questions/16740034/http-how-to-send-multiple-pre-cached-gzipped-chunks#comment27831334_16740510 - turns out only Opera supports this. – Nino Walker Dec 11 '13 at 21:12