]> git.ipfire.org Git - thirdparty/squid.git/commit - src/adaptation/icap/ModXact.cc
HttpRequest::helperNotes to NotePairs
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 29 Apr 2013 13:31:05 +0000 (16:31 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 29 Apr 2013 13:31:05 +0000 (16:31 +0300)
commitcf9f0261d2588344038a89f764325b80179a7e0d
treeaff74e599930a53112d5b59c9d5a20704c09ad84
parentdb039de65b547a4d5beee70cfa774751d42185b3
HttpRequest::helperNotes to NotePairs

This patch try to fix current current Notes interface and usage.
The changes done having in mind that we need:

  1) to add multiple notes with the same key
  2) to support 3 different note types: adaptation meta headers, helper notes
    and custom notes added by the system administrator
  3) to log notes using the %note formating code
  4) to use the %note formating code everywhere the formating API is used. For
    example use the %note with the request_header_add configuration parameter.
  5) to use notes with ACLs.

Details:
 - The NotePairs class is not a kid of HttpHeader class anymore. It is
   implemented from scratch to cover Helper/adaptation and custom notes needs.
     * The new class stores key:value pairs in list. It allow multiple entries
       with the same key.
     * Includes a find method which return a coma separated list of values
       for a given key
 - The HttpRequest::helperNotes is now a Refcount of a HttpPairs object
 - The HelperReply::notes is now a HttpPairs object
 - The AccessLogEntry::notes now is a RefCount of a HttpPairs object, and
   stores only the custom notes add by the "note" configuration parameter
 - Add the AccessLogEntry::helperNotes which is a RefCount of a HttpPairs object
   to store notes added by helpers.
   Now the notes added by adaptation or helpers are accessible to format/* code
   imediatelly after added. Before this patch are accessible only for logging.

Future work:
 - Posible merge AccessLogEntry::notes and AccessLogEntry::helperNotes
 - Performance fixes

This is a Measurement Factory project
18 files changed:
src/AccessLogEntry.h
src/HelperReply.cc
src/HelperReply.h
src/HttpHeader.h
src/HttpRequest.cc
src/HttpRequest.h
src/Notes.cc
src/Notes.h
src/adaptation/History.h
src/adaptation/ecap/XactionRep.cc
src/adaptation/icap/ModXact.cc
src/auth/digest/UserRequest.cc
src/auth/negotiate/UserRequest.cc
src/auth/ntlm/UserRequest.cc
src/client_side.cc
src/client_side_request.cc
src/external_acl.cc
src/format/Format.cc