<div class="gmail_quote">2009/12/12 Robert Olofsson <span dir="ltr"><<a href="mailto:robert.olofsson@khelekore.org">robert.olofsson@khelekore.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">If you add the HttpSnoop filter to the httpoutfilters you can easily see</div><..> the data is gzipped.<br></blockquote><div><br></div><div>Cool, thanks for explanation! That just suddenly started to make sense now.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Rabbit should not normally try to filter this data, if it is then it is doing the<br>
wrong thing.<br></blockquote><div><br></div><div>Yep, I think the fix is necessary (at least in 4.2, haven't got a chance to look at 4.3). Something like</div><div><br></div><div>if ("gzip".equals(response.getHeaders("Content-Encoding"))) {</div>
<div>   return;</div><div>}</div><div><br></div><div>in FilterHandler::handleArray, just before parser.setText (arr, off, len) perhaps?</div><div>But this might be just too straightforward...</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

If you set "repack=true" rabbit ought to unpack and filter pages<br>
that are gzipped.<br></blockquote><div><br></div><div>This makes sense only if repack=true *and* compress=true. If compress=false and repack=true, browser ends up in "Content Encoding Error" when trying to get gzipped stream, such as <a href="http://www.guardian.co.uk">http://www.guardian.co.uk</a>. Is this expected?</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Rabbit does not normally try to unzip compressed pages, since<br>
compressed content means that someone has already thought about<br>
minimizing the content and then rabbit will only add latency.<br></blockquote><div><br></div><div>Yes, unless one wants to be too intrusive or more user friendly :)</div><div><br></div><div>Also, another question: what is the best way to share data between proxy.filter.HttpFilter and proxy.filter.HtmlFilter?</div>
<div>E.g. say I want to show a nice (HTML) error screen (which I would normally do in proxy.filter.HtmlFilter) if user is not authenticated (and that's decided in proxy.filter.HttpFilter), instead of just throwing a default HTTP 407.</div>
<div>One way of doing this would be throwing extra rabbit.http.HttpHeader and check (also delete?) it later. But is this good enough? Any other options?</div><div><br></div><div>Thanks a lot for help!</div><div><br></div>
<div>Regards,</div><div>Mindaugas</div><div><br></div></div>