--- parser3/src/main/untaint.C 2001/09/26 10:32:26 1.63 +++ parser3/src/main/untaint.C 2001/10/08 09:04:08 1.66 @@ -4,7 +4,7 @@ Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: untaint.C,v 1.63 2001/09/26 10:32:26 parser Exp $ + $Id: untaint.C,v 1.66 2001/10/08 09:04:08 parser Exp $ */ #include "pa_pool.h" @@ -15,6 +15,7 @@ #include "pa_globals.h" #include "pa_sql_connection.h" #include "pa_dictionary.h" +#include "pa_common.h" #define escape(action) \ { \ @@ -159,6 +160,7 @@ char *String::store_to(char *dest, Untai Dictionary *typo_dict=user_typo_dict?user_typo_dict:default_typo_dict; bool whitespace=true; + bool need_to_close_http_header_quote=false; const Chunk *chunk=&head; do { const Chunk::Row *row=chunk->rows; @@ -237,7 +239,7 @@ char *String::store_to(char *dest, Untai case '\"': to_string("\\\"", 2); break; _default; }); - *dest++='\"'; + need_to_close_http_header_quote=true; } else { memcpy(dest, row->item.ptr, row->item.size); dest+=row->item.size; @@ -395,15 +397,16 @@ char *String::store_to(char *dest, Untai if(dest==dest_after_origins) // never moved==optimized space dest=dest_before_origins; else { - for(char *p=dest_after_origins; plink; } while(chunk); + + if(need_to_close_http_header_quote) + *dest++='\"'; break2: return dest; }