Skip to content

Protocol set to 1.1 #766

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

Merged
merged 1 commit into from
Apr 18, 2019
Merged

Conversation

sinhaashish
Copy link
Contributor

@sinhaashish sinhaashish commented Apr 16, 2019

okhttp3.OkHttpClient uses default http2.0 by default, which has been changed to 1.1 as web server behaved incorrectly when HTTP/2 is enabled.
With http2.0 errors like okhttp3.internal.http2.StreamResetException: stream was reset: PROTOCOL_ERROR and okhttp3.internal.http2.StreamResetException: stream was reset: NO_ERROR arises

The resolution to this issue as suggested in community is to change the protocol to 1.1
Refer and thus this PR restricts the protocol to 1.1

Fixes #765
Fixes minio/minio#7501
[Fixes] (minio/minio#7501)
Refer

 public OkHttpClient.Builder protocols(List<Protocol> protocols)
Configure the protocols used by this client to communicate with remote servers. 
By default this client will prefer the most efficient transport available, falling back to more
 ubiquitous protocols. Applications should only call this method to avoid specific 
compatibility problems, such as web servers that behave incorrectly when HTTP/2 is enabled.

@harshavardhana
Copy link
Member

The description is not elaborate, can you provide more details of the fix ?

By default http2.0 was being used , which has been changed to 1.1 as  web server behaved incorrectly when HTTP/2 is enabled
@sinhaashish
Copy link
Contributor Author

The description is not elaborate, can you provide more details of the fix ?

updated.

@harshavardhana
Copy link
Member

I am still not sure if this is the right fix @sinhaashish - turning off http2.0 is perhaps not the solution here.

@deekoder
Copy link
Contributor

@harshavardhana is there a recommendation for @sinhaashish

@harshavardhana
Copy link
Member

@harshavardhana is there a recommendation for @sinhaashish

My recommendation is we talk to upstream Go first and report this issue to them and get their guidance on what might be happening. Since this issue is sporadic as well, we shouldn't default to HTTP 1.1 right away without much information.

Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

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

Okay for the time being, please open another GitHub issue to trace back to the original problem here @sinhaashish - we need to follow up with Go upstream and circle back with a reproducer.

Since HTTP2.0 is important for our clients as much as for our servers.

@sinhaashish
Copy link
Contributor Author

Go UpSTream Issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants