Mercurial > prosody-hg
comparison util/xmppstream.lua @ 4290:aaa06e68a9e4
Merge 0.8->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 02 Jun 2011 15:28:41 +0100 |
| parents | ffaaa3fd3189 1e68721c02f2 |
| children | a101c59772e7 |
comparison
equal
deleted
inserted
replaced
| 4286:1bceebe2b117 | 4290:aaa06e68a9e4 |
|---|---|
| 165 end | 165 end |
| 166 stanza, chardata = nil, {}; | 166 stanza, chardata = nil, {}; |
| 167 stack = {}; | 167 stack = {}; |
| 168 end | 168 end |
| 169 end | 169 end |
| 170 | 170 |
| 171 local function restricted_handler() | 171 local function restricted_handler(parser) |
| 172 cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1."); | 172 cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1."); |
| 173 if not parser:stop() then | |
| 174 error("Failed to abort parsing"); | |
| 175 end | |
| 173 end | 176 end |
| 174 | 177 |
| 175 if lxp_supports_doctype then | 178 if lxp_supports_doctype then |
| 176 xml_handlers.StartDoctypeDecl = restricted_handler; | 179 xml_handlers.StartDoctypeDecl = restricted_handler; |
| 177 end | 180 end |
