changeset 154:055164434caa

- Added a couple Dstr_append_l calls (necessary for binary strings).
author jcid
date Mon, 24 Mar 2008 22:51:06 +0100
parents f175ca0f22be
children fb8da086d7da
files dpi/cookies.c src/html.cc
diffstat 2 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/cookies.c	Thu Mar 20 17:04:17 2008 +0100
+++ b/dpi/cookies.c	Mon Mar 24 22:51:06 2008 +0100
@@ -337,7 +337,6 @@
 
    filename = dStrconcat(dGethomedir(), "/.dillo/cookies", NULL);
    if ((old_cookies_file_stream = fopen(filename, "r")) != NULL) {
-      dFree(filename);
       MSG("WARNING: Reading old cookies file ~/.dillo/cookies too\n");
 
       /* Get all lines in the file */
@@ -407,11 +406,9 @@
             Cookies_add_cookie(cookie);
          }
       }
-   fclose(old_cookies_file_stream);
-   } else {
-      dFree(filename);
+      fclose(old_cookies_file_stream);
    }
-
+   dFree(filename);
 }
 
 /*
--- a/src/html.cc	Thu Mar 20 17:04:17 2008 +0100
+++ b/src/html.cc	Mon Mar 24 22:51:06 2008 +0100
@@ -4082,7 +4082,7 @@
             if (input->name) {
                dstr = dStr_new(input->name);
                dstr = Html_encode_text(encoder, dstr);
-               dStr_append(DataStr, dstr->str);
+               dStr_append_l(DataStr, dstr->str, dstr->len);
                dStr_free(dstr, 1);
             }
             for (i = 0; i < dList_length(values); i++) {
@@ -4090,7 +4090,7 @@
                dList_remove(values, dstr);
                if (input->type != DILLO_HTML_INPUT_FILE)
                   dstr = Html_encode_text(encoder, dstr);
-               dStr_append(DataStr, dstr->str);
+               dStr_append_l(DataStr, dstr->str, dstr->len);
                dStr_free(dstr, 1);
             }
          }