Index: gwlib/mime.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/mime.c,v
retrieving revision 1.23
diff -u -r1.23 mime.c
--- gwlib/mime.c	2 Jul 2008 14:31:47 -0000	1.23
+++ gwlib/mime.c	18 Jul 2008 23:38:19 -0000
@@ -346,6 +346,7 @@
      * from our caller, then duplicate them and continue */
     if (headers != NULL) {
         /* duplicate existing headers */
+	http_destroy_headers(e->headers);
         e->headers = http_header_duplicate(headers);
     } else {
         /* parse the headers out of the mime block */
