Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make ICAP Preview work #17

Open
gr3m1in opened this issue Apr 24, 2019 · 0 comments
Open

How to make ICAP Preview work #17

gr3m1in opened this issue Apr 24, 2019 · 0 comments

Comments

@gr3m1in
Copy link

gr3m1in commented Apr 24, 2019

Hi,

I'm trying to set up an ICAP preview option, but the requests always go to modify() method and never hit preview().
Squid configuration contains

icap_preview_enable on
icap_preview_size 4096

and I've even tried to hardcode preview header to bitz-server's OPTIONS response, as RFC describes

   -- Preview:

      The number of bytes to be sent by the ICAP client during a
      preview.  This header MAY be included in the OPTIONS response.

      For example:
      Preview: 1024

using the following patch

--- a/src/bitz/options_request_handler.cpp      2019-04-24 15:12:20.809422286 +0200
+++ b/src/bitz/options_request_handler.cpp      2019-04-24 15:12:51.316184238 +0200
@@ -38,6 +38,7 @@
                header->attach( "Methods", _methods.at( 0 ) );
                header->attach( "Options-TTL", "3600" );
                header->attach( "Allow", "204" );
+               header->attach( "Preview", "4096" );

                response = new icap::Response( header );
                return response;

with no luck.

Am I doing something wrong or is there something else must be done to make preview working?

Thanks in advance.

Kind regards,
gr3m1in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant