logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: tmda/bin ChangeLog,1.258,1.259 tmda-inject,1.75,1.76: msg#00056

Subject: CVS: tmda/bin ChangeLog,1.258,1.259 tmda-inject,1.75,1.76
Update of /cvsroot/tmda/tmda/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv31943/bin

Modified Files:
        ChangeLog tmda-inject 
Log Message:
ADDED_HEADERS_{CLIENT,SERVER} are dictionaries, which unlike lists are
unordered. This creates problems if you want to add a sequence of
headers in order. So, we now sort the keys() first so they will be
added in alphabetical order.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/ChangeLog,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -r1.258 -r1.259
--- ChangeLog   22 Feb 2003 21:03:31 -0000      1.258
+++ ChangeLog   26 Feb 2003 19:43:54 -0000      1.259
@@ -1,3 +1,8 @@
+2003-02-26  Jason R. Mastaler  <jasonrm@xxxxxxxxxxxxxxxxxxxxxxxx>
+
+       * tmda-inject (inject_message): Sort ADDED_HEADERS_CLIENT before
+       adding them to the message.
+
 2003-02-22  Jason R. Mastaler  <jason@xxxxxxxxxxxxxxxxxxxxxxx>
 
        * tmda-inject (inject_message): Bugfix. Remove all tag action

Index: tmda-inject
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-inject,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- tmda-inject 22 Feb 2003 21:03:32 -0000      1.75
+++ tmda-inject 26 Feb 2003 19:43:55 -0000      1.76
@@ -263,9 +263,11 @@
            msg['X-TMDA-Fingerprint'] = (Cookie.make_fingerprint(hdrlist))
     # Optionally, add some headers.
     if Defaults.ADDED_HEADERS_CLIENT:
-        for hdr in Defaults.ADDED_HEADERS_CLIENT.keys():
-            del msg[hdr]
-            msg[hdr] = Defaults.ADDED_HEADERS_CLIENT[hdr]
+        keys = Defaults.ADDED_HEADERS_CLIENT.keys()
+        keys.sort()
+        for k in keys:
+            del msg[k]
+            msg[k] = Defaults.ADDED_HEADERS_CLIENT[k]
     # Optionally, remove some headers.
     if Defaults.PURGED_HEADERS:
        for hdr in Defaults.PURGED_HEADERS:

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs



<Prev in Thread] Current Thread [Next in Thread>