1. Martin Scharrer
  2. SvnDumpLoad

Commits

Martin Scharrer  committed 77cd801

Fixed: New headers not in original-header-order are now added after the orignal headers. Exception is 'Content-length' which is forced to be last if present.

  • Participants
  • Parent commits e9fe39f
  • Branches default

Comments (0)

Files changed (1)

File py/SvnDumpLoad/Format.py

View file
  • Ignore whitespace
             optdict = dict()
             for (optional, header) in self._header_order:
                 optdict[header] = optional
-            order = [ [optdict.get(header, 1), header] for header in self._original_header_order ]
+            order = [ [optdict.get(header, 1), header] for header in self._original_header_order if header != 'Content-length']
+            order.extend([ opthead for opthead in self._header_order if opthead[1] not in self._original_header_order and opthead[1] != 'Content-length'])
+            if 'Content-length' in self._headers:
+                order.append([1, 'Content-length'])
         else:
             order = self._header_order
         for (optional, header) in order: