molnarg / node-http2

An HTTP/2 client and server implementation for node.js
MIT License
1.79k stars 185 forks source link

SETTINGS frame in framer.js #238

Open castpuz opened 7 years ago

castpuz commented 7 years ago

In Deserializer.SETTINGS,

  if (buffer.length % 6 !== 0) { 
    return 'PROTOCOL_ERROR';
  }

BUT

rfc7540 says "A SETTINGS frame with a length other than a multiple of 6 octets MUST be treated as a connection error of type FRAME_SIZE_ERROR."

So, Isn't return 'FRAME_SIZE_ERROR' correct?