The Squid-2 codebase concentrates the client-facing request code, reply code and the bulk of the caching logic into a single source file - src/client_side.c . In addition, there is no documentation for the various code paths taken when handling requests, performing cache logic lookups and manipulation, and constructing/sending replies.
This project aims to initially reorganise the client-side code into separate source files. This will include some documentation about how requests and replies are handled. It will only shuffle code between source files with minimal modifications.
The initial code reorganisation is complete. The following outlines what various source files now implement:
- client_side_async_refresh.c - code implementing the asynchronous/background object refresh
- client_side_body.c - routines which handle some of the POST body logic
- client_side_conn.c - code relating to creating and destroying client-side connections
- client_side_etag.c - ETag related functions
- client_side_ims.c - IMS related functions
- client_side_location_rewrite.c - the URL location redirect rewrite module
- client_side_nat.c - HTTP request interception logic
- client_side_purge.c - the bulk of the PURGE method logic
- client_side_ranges.c - routines related to parsing and handling HTTP range requests
- client_side_refresh.c - wrappers around the external refresh checking logic
- client_side_request.c - most of the ACL processing of the client-side request
- client_side_request_parse.c - the client-side request parsing and construction routines
- client_side_rewrite.c - the normal URL rewrite module
- client_side_storeurl_rewrite.c - the store URL rewrite module
The Vary handling logic is still tightly integrated in the client-side code.
- Try to associate some of the Vary logic code out into a separate source file
- Document the request and reply paths
- Document the few paths taken during HTTP PURGE processing