Hi Henrik, I'm afraid I don't fully know what you mean. I now realise that I am modifying the wrong socket but as to where the code should go I placed the code immediately after httpReplyPack(rep); as you suggested.
There is an array storing listening sockets (ie; HttpSockets[]) but where is the client socket??? Squid code is barely commented at all and I am having a hard time following it. Cheers, Daniel