Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix compression support for h2c protocol ([#4944](https://github.com/opensearch-project/OpenSearch/pull/4944))
- Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response ([#9993](https://github.com/opensearch-project/OpenSearch/pull/9993))
- Fix swapped field formats in nodes API where `total_indexing_buffer_in_bytes` and `total_indexing_buffer` values were reversed ([#17070](https://github.com/opensearch-project/OpenSearch/pull/17070))

- Add HTTP/2 protocol support to HttpRequest.HttpVersion ([#17248](https://github.com/opensearch-project/OpenSearch/pull/17248))

### Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@
return HttpRequest.HttpVersion.HTTP_1_0;
} else if (request.protocolVersion().equals(io.netty.handler.codec.http.HttpVersion.HTTP_1_1)) {
return HttpRequest.HttpVersion.HTTP_1_1;
} else if (request.protocolVersion().equals("HTTP/2.0")) {
return HttpRequest.HttpVersion.HTTP_2_0;

Check warning on line 221 in modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpRequest.java

View check run for this annotation

Codecov / codecov/patch

modules/transport-netty4/src/main/java/org/opensearch/http/netty4/Netty4HttpRequest.java#L221

Added line #L221 was not covered by tests
} else {
throw new IllegalArgumentException("Unexpected http protocol version: " + request.protocolVersion());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@
return HttpRequest.HttpVersion.HTTP_1_0;
} else if (protocol.equals(io.netty.handler.codec.http.HttpVersion.HTTP_1_1.toString())) {
return HttpRequest.HttpVersion.HTTP_1_1;
} else if (protocol.equals("HTTP/2.0")) {
return HttpRequest.HttpVersion.HTTP_2_0;

Check warning on line 160 in plugins/transport-reactor-netty4/src/main/java/org/opensearch/http/reactor/netty4/ReactorNetty4HttpRequest.java

View check run for this annotation

Codecov / codecov/patch

plugins/transport-reactor-netty4/src/main/java/org/opensearch/http/reactor/netty4/ReactorNetty4HttpRequest.java#L160

Added line #L160 was not covered by tests
} else {
throw new IllegalArgumentException("Unexpected http protocol version: " + protocol);
}
Expand Down
3 changes: 2 additions & 1 deletion server/src/main/java/org/opensearch/http/HttpRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public interface HttpRequest {
@PublicApi(since = "1.0.0")
enum HttpVersion {
HTTP_1_0,
HTTP_1_1
HTTP_1_1,
HTTP_2_0
}

/**
Expand Down
Loading