rewrite wrapping of stanzas in websockets