Conversation
|
@rschmitt Would you like to review the change-set adding support for |
| listSize += header.getName().length() * 2; | ||
| if (header.getValue() != null) { | ||
| listSize += header.getValue().length() * 2; | ||
| } | ||
| listSize += 32; |
There was a problem hiding this comment.
I don't like how this code duplicates logic and constants from HPackHeader. Also, why are you multiplying everything by 2?
There was a problem hiding this comment.
@rschmitt How would you interpret the requirement below from section 6.5.2 about length in octets? As far as I understand char representation in Java takes two octets.
uncompressed size of header fields, including the length of the
name and value **in octets** plus an overhead of 32 octets for each
header field.
There was a problem hiding this comment.
I am certain that the specification is referring to bytes on the wire, not the internal in-memory representation, which the peer cannot possibly know. Furthermore, due to JEP 254, modern JVMs now use one byte per character to represent most strings.
No description provided.