summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-03-24 22:51:06 +0100
committerjcid <devnull@localhost>2008-03-24 22:51:06 +0100
commit74d3c301d4ad9333a7d28e2a20ac732cd13ac462 (patch)
tree8a01b9c49a646b16eca17ea5c3717de9e30a92d8
parent8fefe9ce9b44a93e6c3751ba25e38d7891d374ac (diff)
- Added a couple Dstr_append_l calls (necessary for binary strings).
-rw-r--r--dpi/cookies.c7
-rw-r--r--src/html.cc4
2 files changed, 4 insertions, 7 deletions
diff --git a/dpi/cookies.c b/dpi/cookies.c
index fd91e0cc..d816f516 100644
--- a/dpi/cookies.c
+++ b/dpi/cookies.c
@@ -337,7 +337,6 @@ static void Cookies_init()
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 @@ static void Cookies_init()
Cookies_add_cookie(cookie);
}
}
- fclose(old_cookies_file_stream);
- } else {
- dFree(filename);
+ fclose(old_cookies_file_stream);
}
-
+ dFree(filename);
}
/*
diff --git a/src/html.cc b/src/html.cc
index 6338315a..5cdf63f0 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -4082,7 +4082,7 @@ static void Html_submit_form2(DilloHtml *html, DilloHtmlForm *form,
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 @@ static void Html_submit_form2(DilloHtml *html, DilloHtmlForm *form,
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);
}
}