Sounds good.<br><br><div class="gmail_quote">On Tue, Jun 17, 2008 at 4:02 PM, Jacob Burkhart <<a href="mailto:igotimac@gmail.com">igotimac@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey,<div><br></div><div>I noticed in testing that when one of our developers sent a 43MB message to a dev instance of Djabberd it crashed with the output "Killed". </div><div><br></div><div>I'm thinking my stream compression plugin and additions are probably partly to blame here, but regardless I'd like to implement something in Djabberd to limit message sizes.</div>
<div><br></div><div>I'm thinking this would be a config option in djabberd.conf...</div><div><br></div><div>I'm thinking I would have to keep a running count of every byte sent to XMLParser.parse_chunk_scalarref and parse_chunk (maybe from Connection.event_read)</div>
<div><br></div><div>I'm thinking I would have to clear that running count whenever a stanza is parsed out of it. (on_end_capture in SAXHandler.start_element.. or maybe Connection.on_stanza_received)</div><div><br></div>
<div>And then, if that running count ever got larger than the count specified in config, we would close the stream and log an error</div><div><br></div><div>Does this sound like a reasonable approach to the problem?</div>
<div><br></div><div>patch forthcoming....</div><div><br></div><font color="#888888"><div>Jacob</div>
</font></blockquote></div><br>