-
-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Issue Description
After upgrading to the 0.9.0 release, connections that previously worked are now failing with the following error:
Caused by: requests.RequestsException: Received RST_STREAM: Use HTTP/1.1 for request
at requests.Requester$$anon$1.readBytesThrough(Requester.scala:293)
at geny.Readable.writeBytesTo(Writable.scala:93)
at geny.Readable.writeBytesTo$(Writable.scala:91)
at requests.Requester$$anon$1.writeBytesTo(Requester.scala:191)
at requests.Requester.apply(Requester.scala:140)
Current Situation
The underlying HttpClient supports setting the HTTP version:
HttpClient client = HttpClient.newBuilder().version(Version.HTTP_1_1)
However, this functionality is not exposed in the new 0.9.0 release. The HttpClient seems to manage protocol versions differently by default, and the current requests API doesn't provide a way to address this issue.
Root Cause
The HttpClient appears to use HTTP/2 by default:
if (builder.version == null) {
version = HttpClient.Version.HTTP_2;
} else {
version = builder.version;
}
Proposed Solution
It would be helpful if the new API allowed setting HTTP/1.1 as the default version to maintain compatibility with services that don't support HTTP/2.
Additional Notes
This change would be crucial for maintaining backward compatibility with services that rely on HTTP/1.1.
mihaicirneala
Metadata
Metadata
Assignees
Labels
No labels