Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qpack] minor edits #4424

Merged
merged 2 commits into from
Dec 8, 2020
Merged

[qpack] minor edits #4424

merged 2 commits into from
Dec 8, 2020

Conversation

afrind
Copy link
Contributor

@afrind afrind commented Dec 5, 2020

No description provided.

Copy link
Contributor

@ianswett ianswett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small suggestions that I think might improve consistency, but no strong feelings.

@@ -1032,7 +1033,7 @@ the Base.
~~~~~~~~~~
{: title="Indexed Field Line"}

This representation starts with the '1' 1-bit pattern, followed by the 'T' bit
This representation starts with the '1' one-bit pattern, followed by the 'T' bit
indicating whether the reference is into the static or dynamic table. The 6-bit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency?

Suggested change
indicating whether the reference is into the static or dynamic table. The 6-bit
indicating whether the reference is into the static or dynamic table. The six-bit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have mentioned this in the summary. This is intentional, because the spec defines an "N-bit prefix" to mean something very specific, and that was consistently used in numeric format. HPACK also had the "one-bit pattern"/"4-bit prefix" as well. It just got out of sync in some of the QPACK additions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Ian that it would be nice to have a consistent rule across pattern and prefix about writing number numbers with digits versus words. For example, always write with digits, or always write out in words. I've also seen style guides recommending words for numbers up to ten and digits starting from 11 (just like in this sentence). Well, N is always at most 7, so we should probably always use digits or always use words, but preferably do the same for patterns and prefixes within a single document.

I agree with Alan that consistency with HPACK is also desirable. Now HPACK has 5 occurrences of "N-bit pattern" and 14 occurrences of "N-bit prefix" with specific values for N, and every single one of them uses digits to represent N (just like in this sentence).

In contrast, QPACK before this change has 10 occurrences of N-bit pattern with N in words, 2 occurrences of N-bit pattern with N in digits, 0 occurrences of N-bit prefix with N in words, and 20 occurrences of N-bit prefix with N in digits (only counting occurrences where N is a specific number, not A or N or N-1). This change would make all 12 patterns written in words but leave all 20 prefixes in digits. For consistency, I suggest changing all N-bit patterns to writing N in digits.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bencebeky : derp, you are absolutely right. I know I looked at HPACK for consistency but in my head saw it was spelled out in some cases -- must be moving too fast. I'll update it to be digits everywhere, which is both self-consistent in this document consistent with HPACK.

an integer with a 4-bit prefix; see {{prefixed-integers}}.
This representation starts with the '0001' four-bit pattern. This is followed
by the post-base index ({{post-base}}) of the matching field line, represented
as an integer with a 4-bit prefix; see {{prefixed-integers}}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
as an integer with a 4-bit prefix; see {{prefixed-integers}}.
as an integer with a four-bit prefix; see {{prefixed-integers}}.

@@ -1143,7 +1144,7 @@ field name and a field value as string literals.
~~~~~~~~~~
{: title="Literal Field Line With Literal Name"}

This representation begins with the '001' three-bit pattern. The fourth bit is
This representation starts with the '001' three-bit pattern. The fourth bit is
the 'N' bit as described in {{literal-name-reference}}. The name follows,
represented as a 4-bit prefix string literal, then the value, represented as an
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
represented as a 4-bit prefix string literal, then the value, represented as an
represented as a four-bit prefix string literal, then the value, represented as an

@@ -1143,7 +1144,7 @@ field name and a field value as string literals.
~~~~~~~~~~
{: title="Literal Field Line With Literal Name"}

This representation begins with the '001' three-bit pattern. The fourth bit is
This representation starts with the '001' three-bit pattern. The fourth bit is
the 'N' bit as described in {{literal-name-reference}}. The name follows,
represented as a 4-bit prefix string literal, then the value, represented as an
8-bit prefix string literal; see {{string-literals}}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
8-bit prefix string literal; see {{string-literals}}.
eight-bit prefix string literal; see {{string-literals}}.

@LPardue
Copy link
Member

LPardue commented Dec 7, 2020

@afrind is this linked to any issue?

@LPardue LPardue added -qpack editorial An issue that does not affect the design of the protocol; does not require consensus. labels Dec 7, 2020
@afrind
Copy link
Contributor Author

afrind commented Dec 7, 2020

@LPardue : no actually. I should probably create one I guess? These came from a review from a past colleague with a sharp eye for detail.

@LPardue
Copy link
Member

LPardue commented Dec 7, 2020

For the scope of changes, I think its fine under an editor prerogative. Just wanted to make sure we weren't missing a linkage, alls good.

@@ -1235,8 +1235,9 @@ recovered successfully. However, values with low entropy remain vulnerable.
Attacks of this nature are possible any time that two mutually distrustful
entities control requests or responses that are placed onto a single HTTP/3
connection. If the shared QPACK compressor permits one entity to add entries to
the dynamic table, and the other to access those entries, then the state of the
table can be learned.
the dynamic table, and the other to access those entries to encode chosen field
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if including this commit (from PR 4423) in this PR is intentional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, not intentional, I think I did a git checkout -b from that commit instead of HEAD. But I think if I merge that one first it's not an issue?

@@ -1032,7 +1033,7 @@ the Base.
~~~~~~~~~~
{: title="Indexed Field Line"}

This representation starts with the '1' 1-bit pattern, followed by the 'T' bit
This representation starts with the '1' one-bit pattern, followed by the 'T' bit
indicating whether the reference is into the static or dynamic table. The 6-bit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Ian that it would be nice to have a consistent rule across pattern and prefix about writing number numbers with digits versus words. For example, always write with digits, or always write out in words. I've also seen style guides recommending words for numbers up to ten and digits starting from 11 (just like in this sentence). Well, N is always at most 7, so we should probably always use digits or always use words, but preferably do the same for patterns and prefixes within a single document.

I agree with Alan that consistency with HPACK is also desirable. Now HPACK has 5 occurrences of "N-bit pattern" and 14 occurrences of "N-bit prefix" with specific values for N, and every single one of them uses digits to represent N (just like in this sentence).

In contrast, QPACK before this change has 10 occurrences of N-bit pattern with N in words, 2 occurrences of N-bit pattern with N in digits, 0 occurrences of N-bit prefix with N in words, and 20 occurrences of N-bit prefix with N in digits (only counting occurrences where N is a specific number, not A or N or N-1). This change would make all 12 patterns written in words but leave all 20 prefixes in digits. For consistency, I suggest changing all N-bit patterns to writing N in digits.

* Replace "0" with 0 when referring to indexes
* Make all instructions/representations consistent
  'starts with the 'X' <number spelled out>-bit pattern'
* Added a line break to help disambiguate 'These streams'
@afrind afrind merged commit 51f74ee into master Dec 8, 2020
@afrind afrind deleted the qpack-minor-edits branch December 8, 2020 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-qpack editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants