query_rewrite: no charset for error queries
[metaproxy-moved-to-github.git] / src / filter_query_rewrite.cpp
index 6e77295..9bf1eac 100644 (file)
@@ -125,7 +125,7 @@ void yf::QueryRewrite::Rep::process(mp::Package &package) const
                     xmlFreeDoc(doc_input);
                 }
             }
-            if (charset_to.length() && charset_from.length() &&
+            if (!error_code && charset_to.length() && charset_from.length() &&
                 (req->query->which == Z_Query_type_1
                  || req->query->which == Z_Query_type_101))
             {