{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/4043","labels_url":"https://api.github.com/repos/netty/netty/issues/4043/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/4043/comments","events_url":"https://api.github.com/repos/netty/netty/issues/4043/events","html_url":"https://github.com/netty/netty/pull/4043","id":97924250,"number":4043,"title":"[#4030] XmlFrameDecoder is corrupt","user":{"login":"tomaszc","id":5727344,"avatar_url":"https://avatars.githubusercontent.com/u/5727344?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaszc","html_url":"https://github.com/tomaszc","followers_url":"https://api.github.com/users/tomaszc/followers","following_url":"https://api.github.com/users/tomaszc/following{/other_user}","gists_url":"https://api.github.com/users/tomaszc/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaszc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaszc/subscriptions","organizations_url":"https://api.github.com/users/tomaszc/orgs","repos_url":"https://api.github.com/users/tomaszc/repos","events_url":"https://api.github.com/users/tomaszc/events{/privacy}","received_events_url":"https://api.github.com/users/tomaszc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-29T12:24:23Z","updated_at":"2015-07-29T12:38:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/4043","html_url":"https://github.com/netty/netty/pull/4043","diff_url":"https://github.com/netty/netty/pull/4043.diff","patch_url":"https://github.com/netty/netty/pull/4043.patch"},"body":"Motivation:\r\n\r\nTwo problems:\r\n1. Decoder assumption that as soon as it finds </ element it can decrement opened xml brackets counter. It can lead to bugs when closing bracket is not in byteBuf yet.\r\n2. Not proper handling of more than two root elements in XML document. First element will be processed properly, second one not. It is caused by assumption that byteBuf readerIndex is 0 at the begging of decoding.\r\n\r\nModifications:\r\n\r\nBoth problems were resolved by fixes:\r\n1. decrement opened brackets count only if </ > enclosing bracket is found\r\n2. consider readerIndex higher than 0 when counting output frame length\r\n\r\nResult:\r\n\r\nBoth problems were resolved"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/125937447","html_url":"https://github.com/netty/netty/pull/4043#issuecomment-125937447","issue_url":"https://api.github.com/repos/netty/netty/issues/4043","id":125937447,"user":{"login":"tomaszc","id":5727344,"avatar_url":"https://avatars.githubusercontent.com/u/5727344?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaszc","html_url":"https://github.com/tomaszc","followers_url":"https://api.github.com/users/tomaszc/followers","following_url":"https://api.github.com/users/tomaszc/following{/other_user}","gists_url":"https://api.github.com/users/tomaszc/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaszc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaszc/subscriptions","organizations_url":"https://api.github.com/users/tomaszc/orgs","repos_url":"https://api.github.com/users/tomaszc/repos","events_url":"https://api.github.com/users/tomaszc/events{/privacy}","received_events_url":"https://api.github.com/users/tomaszc/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T12:38:04Z","updated_at":"2015-07-29T12:38:04Z","body":"@normanmaurer I've done it already 3-4 hours ago. Can you find it or should I sign it once again?"}}