-
Notifications
You must be signed in to change notification settings - Fork 271
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
detect: Make protocol detection more robust #744
Merged
Merged
Changes from 64 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
f5e272e
wip: Add a more robust HTTP detection scheme
olix0r 4444518
Decouple HTTP server from detection
olix0r 352e013
remove defunct test
olix0r 05ec556
fmt
olix0r 24f8c55
cache: Make the cache cloneable with RwLock
olix0r 75b355c
Merge branch 'ver/cache-clone' into ver/detect
olix0r 5ac38a6
Wire up new detection logic
olix0r 6c9192e
touchup
olix0r 21b5719
Fix HTTP/2 detection
olix0r 003dc2c
Add HTTP/1 test case
olix0r 6b0d6a6
Remove the unused Peek types
olix0r 1a9f571
Merge branch 'main' into ver/detect
olix0r 1e53db8
touchup
olix0r 45aa9f2
Merge branch 'main' into ver/detect
olix0r 87befc2
Merge branch 'main' into ver/detect
olix0r d92caf5
Robustify parser tests
olix0r 9ebfde5
Cleanup: commentary + clarity
olix0r b3a0fc2
Rename DetectHttp to NewServeHttp
olix0r 26ec212
Merge branch 'ver/http-server' into ver/detect
olix0r a14ebf1
Remove unneeded special-case
olix0r f6bd87a
nit
olix0r b243b0c
More testing
olix0r 06424fb
Indexing touchup for clarity
olix0r 9c49868
Logging touchup
olix0r 4b938b8
More robust h2 testing
olix0r bc8ce98
Merge branch 'main' into ver/detect
olix0r e7d061e
Merge branch 'main' into ver/detect
olix0r ac67bf3
Add protocol to stack metrics; add TCP scopes
olix0r 9ca96e9
cache: Ensure that actively held services are not evicted
olix0r 0eaffb9
fixup test
olix0r d9e0adf
Merge branch 'ver/cache-retain' into ver/detect
olix0r 18b7123
Remove unnecessary buffers
olix0r 959fa53
Remove unneeded buffer
olix0r f734da9
Comment out cache around http server
olix0r 5823cce
detect: Retain service until connection is complete
olix0r 1c721a0
Merge branch 'main' into ver/detect
olix0r c7ac588
cache: Only spawn a single task per cache entry
olix0r 77a3d59
touchup
olix0r 92c85b6
Split eviction task out into function
olix0r 47ce0fd
Merge branch 'ver/cache-tasks' into ver/detect
olix0r df4dd94
More debug logging
olix0r 7d685cf
Restore detection timeouts
olix0r 726a0c5
Increase default dispatch timeouts to 10s
olix0r b28f592
typo
olix0r 4b99db1
Include the number of bytes read in protocol detection error message
olix0r 3515eee
Even greater dispatch timeout for debugging protocol detection timeouts
olix0r 7b6c3a8
Add diagnostic logs for detection time
olix0r 0c823a6
Revert timeout changes
olix0r daa0025
Make `Option` part of the Detect interface
olix0r 55309d0
Merge branch 'main' into ver/detect
olix0r 9c6fd01
fixup tests
olix0r 4f420b5
fixup test dependency
olix0r f649eed
Make HTTP detection more robust
olix0r ca6b7a4
Disable detection timeout errors for now
olix0r b374e81
Decouple detect timeout from detect impls
olix0r d61a0bd
Use windows rather than manual buffer indices
olix0r b9b2ea7
Fixup tracing in detect tests
olix0r 179dbce
Merge branch 'main' into ver/detect
olix0r 39f69a4
Increase default dispatch timeout
olix0r fde2dbe
Fix tests by adding newline to TCP client message
olix0r bd1e3bf
Lessen detection buffer capacity
olix0r 560dba2
detect: Make protocol detection more robust
olix0r 41152e8
Add a protocol label to stack metrics
olix0r b090162
Merge branch 'ver/stack-protocol' into ver/detect
olix0r 6e220d6
fix test tracing
olix0r ffd96ac
Don't set maybe_h1 to false based on partial h2 preface
olix0r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit/TIOLI: do you think it's worth also having some tests with
\r\n
s in them, just to make sure we're handling that correctly? the logic isn't too complex so i'm not too concerned about it, just a thought...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.
the http detect tests have specific tests for this sort of thing. i think the integration tests should be as simple as possible to test whatever we expect them to tests.