--- parser3/src/classes/xdoc.C 2015/04/06 22:27:25 1.181 +++ parser3/src/classes/xdoc.C 2015/10/26 01:21:55 1.183 @@ -1,7 +1,7 @@ /** @file Parser: @b xdoc parser class. - Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ @@ -28,7 +28,7 @@ #include "xnode.h" #include "pa_charsets.h" -volatile const char * IDENT_XDOC_C="$Id: xdoc.C,v 1.181 2015/04/06 22:27:25 moko Exp $"; +volatile const char * IDENT_XDOC_C="$Id: xdoc.C,v 1.183 2015/10/26 01:21:55 moko Exp $"; // defines @@ -564,12 +564,8 @@ static void _file(Request& r, MethodPara VFile& vfile=*new VFile; VHash& vhcontent_type=*new VHash; - vhcontent_type.hash().put( - value_name, - new VString(*oo.mediaType)); - vhcontent_type.hash().put( - String::Body("charset"), - new VString(*oo.encoding)); + vhcontent_type.hash().put(value_name, new VString(*oo.mediaType)); + vhcontent_type.hash().put("charset", new VString(*oo.encoding)); vfile.set_binary(false/*not tainted*/, buf.str?buf.str:""/*to distinguish from stat-ed file*/, buf.length, oo.filename, &vhcontent_type);