<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -119,12 +119,16 @@ length.&quot;
       (insert &quot;\r&quot;))))
 
 (defun http-twiddle-expand-content-length ()
-  &quot;Replace any occurences of $Content-Length with the actual Content-Length.&quot;
+  &quot;Replace any occurences of $Content-Length with the actual Content-Length. Insert one if needed.&quot;
   (save-excursion
     (goto-char (point-min))
     (let ((content-length
            (save-excursion (when (search-forward &quot;\r\n\r\n&quot; nil t)
                              (- (point-max) (point))))))
+      (save-excursion
+        (goto-char (- (point-max) content-length 2))
+        (insert &quot;Content-Length: $Content-Length\r\n&quot;))
+
       (unless (null content-length)
         (let ((case-fold-search t))
           (while (search-forward &quot;$content-length&quot; nil t)</diff>
      <filename>http-twiddle.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ca8dbda24ce5791085f5011b1c8e62873dbdb937</id>
    </parent>
  </parents>
  <author>
    <name>Hasan Veldstra</name>
    <email>hasan.veldstra@gmail.com</email>
  </author>
  <url>http://github.com/hassy/http-twiddle/commit/feef6bcd95ae9d52bf5260469a449c77d851ffed</url>
  <id>feef6bcd95ae9d52bf5260469a449c77d851ffed</id>
  <committed-date>2008-09-07T16:41:55-07:00</committed-date>
  <authored-date>2008-09-07T16:41:55-07:00</authored-date>
  <message>Insert Content-Length at the end of header list.</message>
  <tree>fa1bcfa96534ca123f205d8e6f1f48b88b477346</tree>
  <committer>
    <name>Hasan Veldstra</name>
    <email>hasan.veldstra@gmail.com</email>
  </committer>
</commit>
