Re: [squid-users] url check

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 13 Apr 2001 09:00:23 +0200

gis88530 wrote:

> I want to understand how squid perform regular expression match.
> and

By using regcomp() and regexec() library calls on parts of the received
URL (different ACL types looks at different parts of the URL, some the
whole URL). See acl.c.

> If I want to know the packet flow from kernel to squid,
> then transfer to aclMatchRegex function call.

Squid does not care about packets, it is an application running at the
application layer of things just as any other TCP/IP server/client
(Squid is both, acting as a server when receiving requests from the
browsers, and a client when retreiving the content from the origin
servers). Packets are dealt with by the underlying OS.

The code for reading the request is in client_side.c. When the request
has been fully read and some other processing done on the received
request then the program flow gets to clientAccessCheck() who alls
aclNBCheck() who calls aclCheck() who calls aclMactchAclList() who calls
aclMatchAcl() who calls aclMatchRegex().

When the full access check is done clientAccessCheckDone() is called, as
indicated by clientAccessCheck() in the aclNBCheck() call.

--
Henrik Nordstrom
Squid Hacker
Received on Fri Apr 13 2001 - 01:42:00 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:59:18 MST