<div dir="ltr"><a href="https://issues.redhat.com/browse/UNDERTOW-1746">https://issues.redhat.com/browse/UNDERTOW-1746</a> <div> <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 7, 2020 at 6:51 PM Brad Wood &lt;<a href="mailto:bdw429s@gmail.com">bdw429s@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks for confirming.  I was wondering myself about introducing a new name in order to avoid the mess of the breaking change.  I would just recommend we make sure to deprecate the old ones that are named poorly.  I&#39;ll enter a ticket in a bit.<div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 7, 2020 at 6:44 PM Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Yea, this does not seem correct, but IMHO they are both named terribly. In order to avoid a breaking change how about we deprecate these, and replace them with &#39;request-larger-than&#39; and &#39;request-smaller-than&#39; to make it clearer exactly what is being tested?</div><div><br></div><div>Stuart<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 8 Jul 2020 at 04:39, Brad Wood &lt;<a href="mailto:bdw429s@gmail.com" target="_blank">bdw429s@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">These two predicates from undertow are named/implemented backwards.  The &quot;max&quot; should be ensuring the provided value is at least <b>as small or smaller</b> and the &quot;min&quot; should be ensuring the provided value is at least <b>as big or bigger</b>.  But here are the descriptions of each one.<div><br><b>MinContentSizePredicate</b><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Predicate that returns true if the Content-Size of a request is below a given value.</blockquote><br></div><div><br></div><div><b>MaxContentSizePredicate</b><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Predicate that returns true if the Content-Size of a request is above a given value.</blockquote><div><br></div><div>So to spell it out, if someone uses the following predicate:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">max-content-size(5)</font></blockquote><div><br></div><div>That means they are saying the maximum content size is 5 bytes.  So, here&#39;s a quick truth table:</div><div><ul><li>If content length is <b>4 bytes </b>-&gt; should return <b>true </b>(under the max)</li><li>if content length is <b>5 bytes </b>-&gt; should return <b>true </b>(at the max, but not over)</li><li>if content length is <b>6 bytes </b>-&gt; should return <b>false </b>(over the max)</li></ul></div><div>But this is the exact opposite of how these predicates have been implemented.  The javadoc matches the behavior, but not the name.</div><div><br></div><div>Can I get a quick confirmation this is, in fact, backwards before I enter a ticket and/or pull request.  Note, this will be a breaking change to fix.<br></div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a></blockquote></div>
</blockquote></div>
</blockquote></div>