--- parser3/src/classes/xdoc.C 2016/04/06 16:08:19 1.185 +++ parser3/src/classes/xdoc.C 2016/10/26 15:44:49 1.189 @@ -28,7 +28,7 @@ #include "xnode.h" #include "pa_charsets.h" -volatile const char * IDENT_XDOC_C="$Id: xdoc.C,v 1.185 2016/04/06 16:08:19 moko Exp $"; +volatile const char * IDENT_XDOC_C="$Id: xdoc.C,v 1.189 2016/10/26 15:44:49 moko Exp $"; // defines @@ -47,6 +47,7 @@ public: // global variable +DECLARE_CLASS_VAR(xnode, new MXnode); // must be here as Xdoc is inherited from Xnode and should be inited before DECLARE_CLASS_VAR(xdoc, new MXdoc); // helper classes @@ -378,10 +379,10 @@ static void _create(Request& r, MethodPa xmlDoc* xmldoc; bool set_encoding=false; if(param.get_junction()) { // {...} - Temp_lang temp_lang(r, String::L_XML); + const String& xml=r.process_to_string(param); + String::Body sbody=xml.cstr_to_string_body_untaint(String::L_XML, r.connection(false), &r.charsets); - String::Body sbody=xml.cstr_to_string_body_untaint(r.flang, r.connection(false), &r.charsets); xmldoc=xmlParseMemory(sbody.cstr(), sbody.length()); //printf("document=0x%p\n", document); @@ -476,7 +477,7 @@ String::C xdoc2buf(Request& r, VXdoc& vd render=&r.charsets.source(); header=&r.charsets.client(); } else { - header=render=&charsets.get(oo.encoding->change_case(r.charsets.source(), String::CC_UPPER)); + header=render=&pa_charsets.get(*oo.encoding); } const char* render_encoding=render->NAME_CSTR(); const char* header_encoding=header->NAME_CSTR(); @@ -794,6 +795,7 @@ MXdoc::MXdoc(): MXnode(XDOC_CLASS_NAME) // global variable +DECLARE_CLASS_VAR(xnode, 0); // fictive DECLARE_CLASS_VAR(xdoc, 0); // fictive #endif