On 23/07/2019 11:27, Mark Thomas wrote: > On 23/07/2019 09:40, jean-frederic clere wrote: >> Hi, >> >> I have tried to run summerwind/h2spec (docker (1)) to validate tomcat >> master (using the apr connector and java8) and I have a bunch of errors. >> >> Does someone validate our code against another test suite? >> >> (1) https://github.com/summerwind/h2spec > > That is the one I have been using. > >>From memory, there was one (maybe two?) explainable failures once Tomcat > was configured appropriately - mainly (only?) turning off server > initiated pings. > > Mark > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
Something like: +++ index 637e690c65..255883fb93 100644 --- a/java/org/apache/coyote/http2/HPackHuffman.java +++ b/java/org/apache/coyote/http2/HPackHuffman.java @@ -380,7 +380,8 @@ public class HPackHuffman { int treePos = 0; boolean eosBits = true; int eosBitCount = 0; - for (int i = 0; i < length; ++i) { + int i = 0; + for (; i < length; ++i) { byte b = data.get(); int bitPos = 7; while (bitPos >= 0) { @@ -406,6 +407,9 @@ public class HPackHuffman { } else { target.append((char) ((val >> 16) & LOW_MASK)); treePos = 0; + if (eosBitCount != 0) { + throw new HpackException("Oops... JFC"); + } eosBits = true; } } +++ Seems to make the test suite happy, commments? -- Cheers Jean-Frederic --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org