Linux – tcpdump filter according to http header content

linuxtcpdump

using tcpdump i would like to filter the responses that comes back from a squid cache server to only the responses that came back from the cache.
that means that i need to filter according to the X-CACHE header value, if it's value is HIT, i should show it, otherwise the response is not from the cache.
any idea what should my tcpdump filter be ?

Best Answer

Have you considered using ngrep instead of tcpdump?