Block content/file after data-trickling started
Hi
I plan to add data trickling to my eCAP adapter which attaches to squid to block certain content/requests.
Before adapter can trickle it has to call useAdapted(). Because I know that blockVirgin() is not available anymore after useAdapted() was called by the adapter, I am looking for an alternative way to display an error page to the user in case of blocking. At the moment I have two vague approaches in mind:
1. Add a custom HTTP header which then triggers an error page within the host (squid). This would require the adapter to modify/add headers after useAdapted() was called. Is this possible?
2. Reply the error page as "adapted content" from the adapter instead of the file to be blocked. I know this is possible in case the adapter has not replied any content yet. But I guess this won't work when some bytes of the (real) file were replied already by data trickling because this would result in some sort of file mixture.
Do you have other ideas how to solve that? The well known CLAMAV adapter, which implements configurable data-trickling, the adapter aborts the adaptation in case useAdapted() was called before the block-decision is made. Used with squid 3.5 this leads to a connection close without error page upon a file to be blocked being downloaded. Which I think is not a desirable behaviour but I wonder if there is a better way!?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- eCAP Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Christof Gerber for more information if necessary.