From bc686db2b5457d1c62de909dcaadba27e3d5df41 Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 12 May 2013 10:19:26 +0000 Subject: [PATCH] Core: Fixed xmlize issue with missing value in XML git-svn-id: svn://ultimatepp.org/upp/trunk@6054 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/InetUtil.cpp | 1 - uppsrc/Core/Value.cpp | 3 +++ uppsrc/Core/XML.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/uppsrc/Core/InetUtil.cpp b/uppsrc/Core/InetUtil.cpp index 0cd85f1a1..d6e19c446 100644 --- a/uppsrc/Core/InetUtil.cpp +++ b/uppsrc/Core/InetUtil.cpp @@ -471,7 +471,6 @@ bool HttpResponse(TcpSocket& socket, bool scgi, int code, const char *phrase, if(content_type) r << "Content-Type: " << content_type << "\r\n"; r << "\r\n"; - LOG(r + data); if(!socket.PutAll(r)) return false; return data.GetCount() == 0 || socket.PutAll(data); diff --git a/uppsrc/Core/Value.cpp b/uppsrc/Core/Value.cpp index c764f8a81..caa2450f0 100644 --- a/uppsrc/Core/Value.cpp +++ b/uppsrc/Core/Value.cpp @@ -390,6 +390,9 @@ void Value::Xmlize(XmlIO& xio) } else { String name = xio.GetAttr("type"); + if(Upp::IsNull(name)) + *this = Value(); + else if(name == s_binary) { String s; Upp::Xmlize(xio, s); diff --git a/uppsrc/Core/XML.h b/uppsrc/Core/XML.h index 95872ff14..c92942d88 100644 --- a/uppsrc/Core/XML.h +++ b/uppsrc/Core/XML.h @@ -36,7 +36,7 @@ enum { XML_DOC, XML_TAG, XML_END, XML_TEXT, XML_DECL, XML_PI, XML_COMMENT, XML_E struct XmlError : public Exc { - XmlError(const char *s) : Exc(s) {} + XmlError(const char *s) : Exc(s) { DDUMP(s); } }; class XmlParser {