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