-
Notifications
You must be signed in to change notification settings - Fork 528
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
HTTP: add Frame type enumeration #1853
base: master
Are you sure you want to change the base?
Conversation
Type IDs per current HTTP specifications for HTTP/2, HTTP/3 and extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding unused code requires justification. A PR that adds nothing but unused code requires serious justification. I do not see any justification in current PR title/description. I also see no good reason to add this unused code right now1, so I cannot suggest or guess what that justification might be.
There are other problems with this PR, but I am focusing on the primary one for now.
Footnotes
-
We should not start adding HTTP/2+ support bits until we pay off major technical debt standing in the way of proper HTTP/2+ support (e.g., Client Streams API and Server class). ↩
I believe that refactoring/cleanup you refer to should be done with the understanding that Squid needs to add support for HTTP/2+ versions. As such, incorporating the concepts from those latest versions to interpret and handle the existing HTTP/1 messages - rather than refactoring with only regard to HTTP/1 needs. We have already added the "stream" concept and using it as pertains to HTTP/1. Next relevant is this "frame" concept for type-code identifying the parts of HTTP messages being handled. |
That understanding already exists, so that precondition is already satisfied. If you disagree, then I would certainly take quality cleanup unaffected by that understanding than no cleanup at all! After all, that technical debt affects existing HTTP/1 support as well -- it is not just in the way of HTTP/2+ support. It is in the way of many things.
While some concepts can and should be incorporated, frame type identifiers (i.e. the subject of this PR) is not really a "concept", and we have no use for them today AFAICT. We can add them when/if the situation changes.
If "stream concept" is existing Client Streams code, then that concept should be removed/replaced. We cannot build anything (worth building) on top of it. I am not aware of any primary Squid code that can benefit from introducing a frame concept at least until that technical debt is resolved. |
Your initial response to this PR despite my #1853 (comment) indicates that there are still some differences to work out. FTR, the
You have a circular argument there. This addition does not exist because old code does not use it. HTTP/2+ code cannot go in because these pre-requisites do not exist. Ergo, Squid cannot ever gain new code for HTTP/2+ support.
No, I am referring to
For future HTTP/2+ versions the |
Very true: While this particular precondition has been satisfied long time ago, there are many other refactoring/cleanup issues that we approach very differently.
FWIW, I still do not see this PR as progress. The discussion so far has not helped.
Correct "HTTP/1 refactoring" should not need this type AFAICT. That is one of the primary reasons I am against adding this unused code right now. I do not want to reject a followup refactoring PR that injects HTTP/2+ frame IDs into HTTP/1 code. And I do not want to reject another PR that adds HTTP/2+ code prior to required refactoring of existing code.
My argument is not circular because "these prerequisites" do not include "this addition". We need to fix several major problems with the current foundation first and only then start adding HTTP/2+ bits. The former does not require (and can be harmed by) the latter. Very roughly speaking, the next steps should follow a plan similar to this:
An API that passes HTTP message body blocks does not need (and should not know about) frame types. |
No description provided.