blockVirgin Works for CONNECT but Custom Response does not work

Asked by Jatin on 2014-06-16

Hello,

When I see a CONNECT request in my eCap adapter then if I call function blockVirgin then I see a squid ACCESS DENIED page which is good.

But if instead of calling blockVirgin if I generate a CUSTOM response message saying "YOU ARE NOT AUTHORISED TO VIEW THIS PAGE" then build response based on FAQ https://answers.launchpad.net/ecap/+faq/2516
then it fails.

Although the same code (request satisfaction) works if I build a custom response for a GET request.

Please suggest how can I achieve CUSTOM response for a CONNECT.

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Rousskov
Solved:
2019-04-03
Last query:
2019-04-03
Last reply:
2014-06-16
Best Alex Rousskov (rousskov) said : #1

I am not sure the host application you are using (Squid) supports request satisfaction for CONNECT requests. CONNECT requests are "special" in many ways and host application often handle them using code paths different from regular requests. You may be hitting such a code path.

If you need to customize a CONNECT error response using eCAP, consider filing a Squid bug and posting ALL,9 cache.log illustrating the current CONNECT satisfaction problem.

Please note that browsers are picky about CONNECT responses. In many cases, a browser would not display a CONNECT response to the user. I trust your code generates the same response Squid generates so it "should work" but do not get too creative with CONNECT responses.

Jatin (jbhasin83) said : #2

Thanks,Alex

Jatin (jbhasin83) said : #3

Thanks Alex Rousskov, that solved my question.