Discussion:
[squid-users] acl rep_header and icap respmod
Alfredo Rezinovsky
2015-09-05 13:29:28 UTC
Permalink
I'm trying to adapt response for all text/html responses.

icap_service service_respmod respmod_precache icap://127.0.0.1:1344/response

acl html rep_header -i Content-Type text\/html
adaptation_access service_respmod allow html

And it doesn't works.

The strange thing is that it does works with:

acl html rep_mime_type text\/html

There should be something i'm missing
--
Alfrenovsky
Antony Stone
2015-09-05 13:32:09 UTC
Permalink
Post by Alfredo Rezinovsky
I'm trying to adapt response for all text/html responses.
icap_service service_respmod respmod_precache
icap://127.0.0.1:1344/response
acl html rep_header -i Content-Type text\/html
adaptation_access service_respmod allow html
And it doesn't works.
acl html rep_mime_type text\/html
There should be something i'm missing
Shouldn't there be a colon in "Content-type: text/html"?


Antony.
--
"Linux is going to be part of the future. It's going to be like Unix was."

- Peter Moore, Asia-Pacific general manager, Microsoft

Please reply to the list;
please *don't* CC me.
Antony Stone
2015-09-05 13:38:39 UTC
Permalink
Post by Antony Stone
Post by Alfredo Rezinovsky
I'm trying to adapt response for all text/html responses.
icap_service service_respmod respmod_precache
icap://127.0.0.1:1344/response
acl html rep_header -i Content-Type text\/html
adaptation_access service_respmod allow html
And it doesn't works.
acl html rep_mime_type text\/html
There should be something i'm missing
Shouldn't there be a colon in "Content-type: text/html"?
No - ignore me :(

I wonder whether http://www.squid-cache.org/mail-archive/squid-
users/200609/0071.html give you a clue, though - maybe using http_reply_access
will work better?


Antony.
--
Behind the counter a boy with a shaven head stared vacantly into space,
a dozen spikes of microsoft protruding from the socket behind his ear.

- William Gibson, Neuromancer (1984)

Please reply to the list;
please *don't* CC me.
Alfredo Rezinovsky
2015-09-05 13:41:49 UTC
Permalink
Post by Antony Stone
Post by Alfredo Rezinovsky
I'm trying to adapt response for all text/html responses.
icap_service service_respmod respmod_precache
icap://127.0.0.1:1344/response
acl html rep_header -i Content-Type text\/html
adaptation_access service_respmod allow html
And it doesn't works.
acl html rep_mime_type text\/html
There should be something i'm missing
Shouldn't there be a colon in "Content-type: text/html"?
Found it

The case insensitive is the regex, not the header name

RIGHT: acl html rep_header Content-Type -i text\/html
WRONG: acl html rep_header -i Content-Type text\/html



Antony.
Post by Antony Stone
--
"Linux is going to be part of the future. It's going to be like Unix was."
- Peter Moore, Asia-Pacific general manager, Microsoft
Please reply to the list;
please *don't* CC me.
_______________________________________________
squid-users mailing list
http://lists.squid-cache.org/listinfo/squid-users
--
Alfrenovsky
Loading...