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 formatting 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.
The NotePairs class is implemented from scratch. It stores the notes in
a simple key:value pairs list, which just allow multiple entries with
the same key. I have an implementation which uses a
"key:value1,value2,value3..." form but my sense is that the
implementation I am posting here is simpler and faster.
- The %{key}notes prints a coma separated list of note values which have
the key as key. Eg the %{user}note will print:
"J, Smith",chtsanti
- The %notes prints a "\r\n" separated list of key:value pairs:
user: "J, Smith"\r\nuser: chtsanti\r\n
- The %notes formating code can be used now with request_header_add and
other similar configuration parameters.
- The Helper response may needs fixing. For example if the helper return:
user="J, Smith",chtsanti
The user:"J, Smith,chtsanti" note will be stored. This is because of
the strwordtok function used to parse responses.
- We may need to merge the AccessLogEntry::notes and
AccessLogEntry::helperNotes/HttpRequest::helperNotes to the same object.
The adaptation meta headers maybe can be merged to the same object to.
Some details also exist in the patch
Regards,
Christos
This archive was generated by hypermail 2.2.0 : Sun Apr 07 2013 - 12:00:11 MDT