On 24/07/2019 09:18, jean-frederic clere wrote:
> 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.

The last version I tested was 2.1.0. h2spec is now up to 2.3.0.

I'm re-running my tests now.

>> >From memory, there was one (maybe two?) explainable failures once Tomcat
>> was configured appropriately - mainly (only?) turning off server
>> initiated pings.

<snip/>

> 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) {

Note sure why the above is necessary.

>              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?

Making the test suite happy in 90% of the battle. Once I can reproduce
this I was planning on looking at the spec to confirm the above fix.
Should be able to do that in the next few hours.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to