changeset 806:1ebc801c1ca4

Fix for d29cdb5b842e (charset decoding given in HTTP and META).
author Jorge Arellano Cid <jcid@dillo.org>
date Thu, 22 Jan 2009 08:28:46 -0300
parents bb850fc92050
children 93de73875a8c
files src/html.cc src/html_common.hh
diffstat 2 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/html.cc	Wed Jan 21 18:57:56 2009 -0300
+++ b/src/html.cc	Thu Jan 22 08:28:46 2009 -0300
@@ -467,8 +467,6 @@
 
    attr_data = dStr_sized_new(1024);
 
-   parse_finished = false;
-
    /* Init page-handling variables */
    forms = new misc::SimpleVector <DilloHtmlForm*> (1);
    inputs_outside_form = new misc::SimpleVector <DilloHtmlInput*> (1);
@@ -511,8 +509,7 @@
 {
    _MSG("::~DilloHtml(this=%p)\n", this);
 
-   if (!parse_finished)
-      freeParseData();
+   freeParseData();
 
    a_Bw_remove_doc(bw, this);
 
@@ -571,10 +568,12 @@
    dFree(aux);
 #endif
 
+   /* Update Start_Buf. It may be used after the parser is stopped */
+   Start_Buf = Buf;
+
    dReturn_if (dw == NULL);
    dReturn_if (stop_parser == TRUE);
 
-   Start_Buf = Buf;
    token_start = Html_write_raw(this, buf, bufsize, Eof);
    Start_Ofs += token_start;
 }
@@ -629,9 +628,6 @@
    }
    /* Remove this client from our active list */
    a_Bw_close_client(bw, ClientKey);
-
-   freeParseData();
-   parse_finished = true;
 }
 
 /*
--- a/src/html_common.hh	Wed Jan 21 18:57:56 2009 -0300
+++ b/src/html_common.hh	Thu Jan 22 08:28:46 2009 -0300
@@ -217,7 +217,6 @@
    int32_t visited_color;
 
 private:
-   bool parse_finished;
    void freeParseData();
    void initDw();  /* Used by the constructor */