okhttp: ignore unknown HTTP/2 settings #3036
Merged
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.
Intended to address #3032.
This was addressed in OkHttp3 by square/okhttp#2299, but I'm fairly certain their fix still contains a bug - they parse the settings id as a Java short, so anything in the experimental range (such as gRPC C++ servers are using) is a negative number, and the linked pull request's use of
break
instead ofcontinue
results in an index out of bounds exception inSettings#set
. I'll follow up on that with the OkHttp repo separately.@ejona86 I'm not sure of the status of the code in okhttp/third_party - since this is "shaded" from OkHttp2, can we patch it, or do we need to move the modifications somehow out of the third_party/ subdirectory? As-is, I'm also not sure where to put tests for this, but just wanted to get the process started.