Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
6561c22
Upgraded HttpCore version to 5.4-alpha1-SNAPSHOT
ok2c Sep 16, 2024
aec14c4
HTTPCORE-770: Introduced `plusAsBlank` parameter for dynamic configur…
arturobernalg Sep 13, 2024
3846fc5
Upgraded HC StyleCheck to version 3; fixed style-check violations (no…
ok2c Sep 23, 2024
ba3d47c
Javadoc
garydgregory Sep 23, 2024
42e2d14
Refactor to use a new class CompletingFutureContribution (#484)
garydgregory Sep 23, 2024
aca2fc9
Fixed deprecation warning
ok2c Sep 24, 2024
4b09af0
A FutureContribution should not allow a null BasicFuture (#485)
garydgregory Sep 24, 2024
7af419b
Upgraded HC Parent to version 14
ok2c Oct 1, 2024
7ae29dd
Updated release series version in the project and site URLs
ok2c Oct 1, 2024
b633366
HTTPCLIENT-2233- Add metrics listener for IOReactor thread pool monit…
arturobernalg Oct 3, 2024
f4f2671
Bug fix: corrected error handling in AbstractAsyncPushHandler
ok2c Oct 10, 2024
7c20952
Migrated Docker based integration tests to TestContainers
ok2c Oct 6, 2024
1b0c4cc
Bug fix: move H2 illegal message header check from message converters…
ok2c Oct 10, 2024
7c59295
Properly alert receivers when using non-default dynamic table sizes
brendan-thomas-adaptiva Oct 10, 2024
5fb5aa0
Bug fix: allow `Host` headers in HTTP/2 request messages
ok2c Oct 12, 2024
bf5871c
HTTPCORE-771: Ignore java.lang.UnsupportedOperationException when gra…
ok2c Oct 12, 2024
7a9465b
Bug fix: fixed the problem with the HTTP/1.1 async protocol handler i…
ok2c Oct 17, 2024
98f3252
Add HTTP/1.1 TE header interceptor and strict client/server option (#…
arturobernalg Oct 20, 2024
b525b94
Improved integration test resource wiring and configuration
ok2c Oct 15, 2024
a1f5c5e
Redesign of compatibility integration tests for greater flexibility a…
ok2c Oct 15, 2024
8b5ea6c
Upgraded nginx image in the compatibility tests to version :1.23
ok2c Oct 20, 2024
66db56a
Removed work-around for an incompatibility in HTTP/2 frame management…
ok2c Oct 20, 2024
c76a974
Dante SOCKS proxy compatibility tests; removed integration tests that…
ok2c Oct 21, 2024
f08e505
Ensure Date header is always present and replace invalid values. (#500)
arturobernalg Oct 23, 2024
230ab3c
Replace package-private static class with a method returning a lambda
garydgregory Oct 29, 2024
ebb75bd
The package-private class SingleAuthorityResolver can be final
garydgregory Oct 29, 2024
e33ad8a
Reuse Function.identity()
garydgregory Oct 29, 2024
7e507b6
Define and use singletons instead of new stateless instances for each
garydgregory Oct 29, 2024
a510c68
Add Javadocs
garydgregory Oct 29, 2024
dbb3cd4
Reuse URIAuthority(Host) constructor avoiding creating new Host
garydgregory Oct 29, 2024
42e61fe
Inline single-use local variable
garydgregory Oct 29, 2024
bce3474
Add HTTP Method QUERY support (#499)
desiderantes Oct 30, 2024
9c46cd4
Use Map#computeIfAbsent() instead of get(), test, and put()
garydgregory Nov 6, 2024
b8ad52f
Make local variable final
garydgregory Nov 6, 2024
210e8bc
Polish Javadoc for HttpResponseInterceptor
izeye Nov 6, 2024
306de8e
Add NoConnectionReuseStrategy
izeye Nov 1, 2024
71b98d4
Update the pointer of Continuation's headerBuffer after copying the p…
CoolTomatos Nov 27, 2024
8ee6483
Optimize connection close logic to resolve timeout delay issue (#508)
ooeunz Nov 28, 2024
b435a0b
HTTPCORE-773: introduced customizable strategy to select i/o dispatch…
ok2c Nov 30, 2024
8bfbb6f
Added more convenience methods to classic request / response builders
ok2c Dec 26, 2024
dddf73e
Added Jetty 12 compatibility tests
ok2c Dec 31, 2024
5b748d0
Minor code cleanups in the H2, HTTP1 and JSSE integration tests
ok2c Jan 1, 2025
bb63f07
Minor performance optimization in handling of HEAD requests by the H2…
ok2c Jan 3, 2025
2cb5fb7
HTTPCORE-774: update window management improvements
ok2c Jan 3, 2025
68865fd
Bump some dependencies
garydgregory Jan 5, 2025
fd5c617
Handle overflow in Deadline calculation to ensure correct behavior fo…
arturobernalg Jan 10, 2025
c897f5a
Bug fix: in some fringe cases the request may still be not fully comp…
ok2c Jan 11, 2025
a4ae27d
HTTPCORE-775: The SSLIOSession::write does not handle SSLEngineResult…
reta Jan 12, 2025
a275c08
Bug fix: Made shared output buffer #writeCompleted block until the en…
ok2c Jan 12, 2025
98e23cb
Bug fix: Corrected shutdown of async HTTP/1.1 connections half-closed…
ok2c Jan 13, 2025
8c24d80
Bug fix: Half-closed SSL sessions must not shut down until explicitly…
ok2c Jan 15, 2025
81a3c82
Bug fix: Shared input buffer to propagate aborted status as I/O inter…
ok2c Jan 17, 2025
7fddbe1
Update error message in ProtocolVersion
Mavelous Feb 3, 2025
bdbf328
Bug fix: ServerHttp1StreamHandler causes an NPE when attempting to ha…
ok2c Feb 12, 2025
b0b7b5c
HTTP/1.1 server protocol handler to use exception callback to report …
ok2c Feb 12, 2025
be99028
Protocol negotiation handlers to use exception callback to report une…
ok2c Jan 2, 2025
9795bd8
Http1TestClient and Http1TestServer to provide configuration for cust…
ok2c Feb 12, 2025
1d65a16
Bug fix: Corrected state tracking of pipelined message exchanges by H…
ok2c Feb 12, 2025
e2e3110
Bug fix: Corrected handling of invalid HTTP protocol version by HTTP/…
ok2c Feb 12, 2025
660aea5
Bug fix: Shared output buffer #writeCompleted fails to signal end of …
ok2c Feb 1, 2025
841f6ac
Bug-fix: Corrected message stream termination by the async HTTP/1.1 p…
ok2c Feb 17, 2025
25861cb
Improved test case asserting the async client transport behavior when…
ok2c Feb 17, 2025
badb42f
Bug fix: corrected the state management in the async HTTP/1.1 protoco…
ok2c Feb 17, 2025
d0707cd
Resource release corrections and code improvements in the base implem…
ok2c Feb 22, 2025
b7c8da2
Created common subclass for H2 and Http1 test servers and clients wit…
ok2c Feb 23, 2025
1681493
HTTPCORE-777: Made I/O reactos cancel out incomplete connect request …
ok2c Mar 6, 2025
6a9e880
Fixed incorrect state logs in async client HTTP/1.1 protocol handler
ok2c Mar 8, 2025
39bf182
Use atomic refs to keep request and response state in async message s…
ok2c Mar 8, 2025
22abdc0
Bug fix: Async message stream handlers to avoid firing data produce e…
ok2c Mar 8, 2025
1741a27
Bug fix: Fixed a race condition in async message stream handlers that…
ok2c Mar 8, 2025
3426b90
HTTPCORE-778: URIBuilder to not encode sub-delims in URI fragment com…
ok2c Mar 14, 2025
817b265
RFC 3986 conformant URI encoding policy (#517)
arturobernalg Mar 16, 2025
96f55fc
Support for parsing of headers representing a list of complex elements
ok2c Apr 1, 2025
9b88df7
Update the GitHub Security page with a link to the new HttpComponents
garydgregory May 12, 2025
2dcdd25
Avoid legacy Socket API in reactor code
rschmitt May 22, 2025
f0338ba
Add Maven wrapper
rschmitt May 24, 2025
4c86d3e
Added method to the async response channel to terminate the ongoing m…
ok2c Jan 2, 2025
f24a94d
Shared buffers to support timeout on blocking operations
ok2c Jan 26, 2025
85c55ad
Redesign of classic over async bridge
ok2c Jan 1, 2025
d171fcf
SingleCoreIOReactor: Add support for Unix domain sockets
rschmitt May 23, 2025
a0ac158
Add ContentType.APPLICATION_ZIP_COMPRESSED (#524)
garydgregory Jun 6, 2025
6d0950f
Bump io.reactivex.rxjava3:rxjava from 3.1.9 to 3.1.10 (#509)
dependabot[bot] Jun 6, 2025
11e103a
Bump org.junit:junit-bom from 5.11.0 to 5.11.3 (#501)
dependabot[bot] Jun 6, 2025
fc47279
Bump testcontainers.version from 1.20.2 to 1.20.4 (#505)
dependabot[bot] Jun 6, 2025
62e2244
Document dependency bumps
garydgregory Jun 6, 2025
8ca12a3
Added Protocol conformance section to README
ok2c Jun 8, 2025
e5843f9
h2: allow configuring FrameFractory (#525)
psmarko Jun 10, 2025
8d68290
Slightly better and efficient #toHexString method
ok2c Jun 10, 2025
7a50e0d
Safe-guard for infinite unproductive loop in non-blocking SSLIOSessio…
Jun 5, 2025
1eb097e
Bump org.junit:junit-bom from 5.13.0 to 5.13.1 (#528)
dependabot[bot] Jun 13, 2025
e94993b
Document bump org.junit:junit-bom from 5.13.0 to 5.13.1 #528
garydgregory Jun 13, 2025
4b596d7
HTTPCORE-782: non-blocking TLS session can end up in an endless loop …
ok2c Jun 18, 2025
208ce64
Bump testcontainers.version from 1.21.1 to 1.21.2 (#530)
dependabot[bot] Jun 20, 2025
81cd8d5
Bump log4j.version from 2.24.3 to 2.25.0 (#529)
dependabot[bot] Jun 20, 2025
83e3746
Document dependency bumps
garydgregory Jun 20, 2025
6d9a1f0
Bump mvnw to 3.9.10
rschmitt Jun 22, 2025
9e338c8
Run GH workflows using mvnw
rschmitt Jun 22, 2025
4ece79b
Bump testcontainers.version from 1.21.2 to 1.21.3 (#534)
dependabot[bot] Jul 4, 2025
876a342
Bump org.junit:junit-bom from 5.13.1 to 5.13.3 (#533)
dependabot[bot] Jul 4, 2025
c301f22
Document dependency bumps
garydgregory Jul 4, 2025
d8d350e
IOFunction functional interface
arturobernalg Jul 13, 2025
d7899b8
Bump Maven to 3.9.11
rschmitt Jul 22, 2025
78e0311
fix ContentType JavaDoc
winfriedgerlach Jul 28, 2025
4b9db72
Drop RxJava 2
rschmitt Jul 28, 2025
968a56e
Fix copy-paste bug in setting socket options
rschmitt Aug 6, 2025
49f1827
Discontinue use of SocketSupport to set extended socket options
rschmitt Aug 6, 2025
076296c
Check for keep-alive option support
rschmitt Aug 8, 2025
1253c7f
Fix hostname verification tests
rschmitt Aug 8, 2025
44b86eb
IOSessionImpl: Support CloseMode.IMMEDIATE for Unix domain sockets
rschmitt Aug 11, 2025
38d26fc
Bug-fix: fixes a potential 'End Stream Headers' vulnerability and add…
ok2c Aug 13, 2025
49ae683
H2 transport to enforce a max limit on number of CONTINUATION frames
ok2c Aug 13, 2025
5b1a796
Optimize release of resources associated by H2 streams: H2StreamHandl…
ok2c Aug 19, 2025
faf44e8
Use RequestNotExecutedException instead of ConnectionClosedException …
ok2c Aug 19, 2025
a202086
Bug-fix: corrected abnormal termination of H2 streams
ok2c Aug 20, 2025
ccb7b49
Improved H2 connection termination in case of the opposite endpoint f…
ok2c Aug 24, 2025
be71c3a
HTTP/1.1 async protocol handler to read message data more greedily
ok2c Aug 24, 2025
c334a3e
ClassicToAsyncResponseConsumer to ensure the latch has been released …
ok2c Aug 30, 2025
a099f9c
Bug fix: corrected exception propagation by BasicClientExchangeHandle…
ok2c Aug 30, 2025
c5d707c
Classic to async facade to propagate ConnectionClosedException to the…
ok2c Aug 30, 2025
40f6dce
RFC 9113 conformance: treat attempts to send frames on a locally clos…
ok2c Aug 28, 2025
ffbe359
RFC 9113 conformance: treat ENABLE_PUSH set to 1 transmitted by the s…
ok2c Aug 30, 2025
e9379c9
RFC 9113 conformance: ensure id of promised streams is valid (greater…
ok2c Aug 30, 2025
7119010
Revised graceful / immediate H2 connection shutdown
ok2c Aug 31, 2025
589152c
RFC 9113 conformance: RST_STREAM with NO_ERROR error code gracefully …
ok2c Sep 2, 2025
23c0d04
RFC 9113 conformance: Stricter validation of message fields
ok2c Sep 2, 2025
94f7c46
RFC 9113 conformance: merge multiple Cookie Header Field into a singl…
ok2c Sep 2, 2025
4b79b5d
Regression: Improved H2 connection termination in case of the opposit…
ok2c Sep 8, 2025
91d5032
RFC 9113 conformance: refactoring of internal H2 stream APIs
ok2c Sep 7, 2025
1b0c1f5
RFC 9113 conformance: corrected H2 stream id generation and verificat…
ok2c Sep 7, 2025
aac46c2
RFC 9113 conformance: improved H2 stream creation and initialization
ok2c Sep 7, 2025
306389e
Disabled ReactiveClient test case failing intermittently with Github …
ok2c Sep 10, 2025
493953b
RFC 9113 conformance: support streams in the reserved state and use c…
ok2c Sep 9, 2025
e1b413d
added enableLocalAuthorityResolver() to ServerBootstrap and AsyncServ…
cdw8j Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

- run: mvn clean package -DskipTests -Drat.skip=true -Dcheckstyle.skip
- run: ./mvnw clean package -DskipTests -Drat.skip=true -Dcheckstyle.skip

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -P-use-toolchains
run: ./mvnw -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -P-use-toolchains,docker
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ maven-eclipse.xml
*.iml
**/log4j2-debug.xml
**/.checkstyle
/test-CA/newcerts/
/test-CA/serial.txt*
/test-CA/index.txt*
20 changes: 20 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionSha256Sum=0d7125e8c91097b36edb990ea5934e6c68b4440eef4ea96510a0f6815e7eeadb
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
wrapperVersion=3.3.2
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ Dependencies

HttpCore requires Java 1.8 compatible runtime.

Protocol conformance
--------------------
-
- [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110) - HTTP Semantics
- [RFC 9112](https://datatracker.ietf.org/doc/html/rfc9112) - Hypertext Transfer Protocol Version 1.1 (HTTP/1.1)
- [RFC 7540](https://datatracker.ietf.org/doc/html/rfc7540) - Hypertext Transfer Protocol Version 2 (HTTP/2)
- [RFC 7541](https://datatracker.ietf.org/doc/html/rfc7541) - HPACK: Header Compression for HTTP/2
- [RFC 1945](https://datatracker.ietf.org/doc/html/rfc1945) - Hypertext Transfer Protocol -- HTTP/1.0
- [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) - Uniform Resource Identifier (URI): Generic Syntax

Licensing
---------

Expand Down
27 changes: 27 additions & 0 deletions RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
Release 5.4-alpha1
------------------

This is the first release in the 5.4 release series.


Change Log
-------------------

* Add ContentType.APPLICATION_ZIP_COMPRESSED.
Contributed by Gary Gregory <ggregory at apache.org>

* Bump io.reactivex.rxjava3:rxjava from 3.1.9 to 3.1.10 #509
Contributed by Gary Gregory <ggregory at apache.org>

* Bump org.junit:junit-bom from 5.11.0 to 5.13.3 #501, #528, #533
Contributed by Gary Gregory <ggregory at apache.org>

* Bump testcontainers.version from 1.20.2 to 1.20.4 #505
Contributed by Gary Gregory <ggregory at apache.org>

* Bump testcontainers.version from 1.21.1 to 1.21.3 #530, #534
Contributed by Gary Gregory <ggregory at apache.org>

* Bump log4j.version from 2.24.3 to 2.25.0 #529
Contributed by Gary Gregory <ggregory at apache.org>

Release 5.3
------------------

Expand Down
7 changes: 4 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
under the License.
-->

# Reporting a vulnerability
# HttpComponents Security

If you believe you found a vulnerability in Apache HttpClient,
please contact [the Apache Security Team](https://www.apache.org/security/).
The HttpComponents Security process and model are on our website's [Security](https://hc.apache.org/security.html) page.

If you believe you found a vulnerability in Apache HttpClient, please contact the [Apache Security Team](https://www.apache.org/security/).
2 changes: 1 addition & 1 deletion httpcore5-h2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5-parent</artifactId>
<version>5.3.1-SNAPSHOT</version>
<version>5.4-alpha1-SNAPSHOT</version>
</parent>
<artifactId>httpcore5-h2</artifactId>
<name>Apache HttpComponents Core HTTP/2</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
*/
public final class H2PseudoRequestHeaders {

public static final String METHOD = ":method";
public static final String SCHEME = ":scheme";
public static final String METHOD = ":method";
public static final String SCHEME = ":scheme";
public static final String AUTHORITY = ":authority";
public static final String PATH = ":path";
public static final String PATH = ":path";

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
*/
public final class H2PseudoResponseHeaders {

public static final String STATUS = ":status";
public static final String STATUS = ":status";

}
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ public class H2Config {
private final int maxFrameSize;
private final int maxHeaderListSize;
private final boolean compressionEnabled;
private final int maxContinuations;

H2Config(final int headerTableSize, final boolean pushEnabled, final int maxConcurrentStreams,
final int initialWindowSize, final int maxFrameSize, final int maxHeaderListSize,
final boolean compressionEnabled) {
final boolean compressionEnabled, final int maxContinuations) {
super();
this.headerTableSize = headerTableSize;
this.pushEnabled = pushEnabled;
Expand All @@ -62,6 +63,7 @@ public class H2Config {
this.maxFrameSize = maxFrameSize;
this.maxHeaderListSize = maxHeaderListSize;
this.compressionEnabled = compressionEnabled;
this.maxContinuations = maxContinuations;
}

public int getHeaderTableSize() {
Expand Down Expand Up @@ -92,6 +94,10 @@ public boolean isCompressionEnabled() {
return compressionEnabled;
}

public int getMaxContinuations() {
return maxContinuations;
}

@Override
public String toString() {
final StringBuilder builder = new StringBuilder();
Expand All @@ -102,6 +108,7 @@ public String toString() {
.append(", maxFrameSize=").append(this.maxFrameSize)
.append(", maxHeaderListSize=").append(this.maxHeaderListSize)
.append(", compressionEnabled=").append(this.compressionEnabled)
.append(", maxContinuations=").append(this.maxContinuations)
.append("]");
return builder.toString();
}
Expand All @@ -110,11 +117,11 @@ public static H2Config.Builder custom() {
return new Builder();
}

private static final int INIT_HEADER_TABLE_SIZE = 4096;
private static final boolean INIT_ENABLE_PUSH = true;
private static final int INIT_MAX_FRAME_SIZE = FrameConsts.MIN_FRAME_SIZE;
private static final int INIT_WINDOW_SIZE = 65535;
private static final int INIT_CONCURRENT_STREAM = 250;
private static final int INIT_HEADER_TABLE_SIZE = 4096;
private static final boolean INIT_ENABLE_PUSH = true;
private static final int INIT_MAX_FRAME_SIZE = FrameConsts.MIN_FRAME_SIZE;
private static final int INIT_WINDOW_SIZE = 65535;
private static final int INIT_CONCURRENT_STREAM = 250;

public static H2Config.Builder initial() {
return new Builder()
Expand Down Expand Up @@ -147,15 +154,17 @@ public static class Builder {
private int maxFrameSize;
private int maxHeaderListSize;
private boolean compressionEnabled;
private int maxContinuations;

Builder() {
this.headerTableSize = INIT_HEADER_TABLE_SIZE * 2;
this.pushEnabled = INIT_ENABLE_PUSH;
this.maxConcurrentStreams = INIT_CONCURRENT_STREAM;
this.initialWindowSize = INIT_WINDOW_SIZE;
this.maxFrameSize = FrameConsts.MIN_FRAME_SIZE * 4;
this.maxFrameSize = FrameConsts.MIN_FRAME_SIZE * 4;
this.maxHeaderListSize = FrameConsts.MAX_FRAME_SIZE;
this.compressionEnabled = true;
this.maxContinuations = 100;
}

public Builder setHeaderTableSize(final int headerTableSize) {
Expand Down Expand Up @@ -198,6 +207,18 @@ public Builder setCompressionEnabled(final boolean compressionEnabled) {
return this;
}

/**
* Sets max limit on number of continuations.
* <p>value zero represents no limit</p>
*
* @since 5,4
*/
public Builder setMaxContinuations(final int maxContinuations) {
Args.positive(maxContinuations, "Max continuations");
this.maxContinuations = maxContinuations;
return this;
}

public H2Config build() {
return new H2Config(
headerTableSize,
Expand All @@ -206,7 +227,8 @@ public H2Config build() {
initialWindowSize,
maxFrameSize,
maxHeaderListSize,
compressionEnabled);
compressionEnabled,
maxContinuations);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
*/
public enum H2Param {

HEADER_TABLE_SIZE (0x1),
ENABLE_PUSH (0x2),
MAX_CONCURRENT_STREAMS (0x3),
INITIAL_WINDOW_SIZE (0x4),
MAX_FRAME_SIZE (0x5),
MAX_HEADER_LIST_SIZE (0x6);
HEADER_TABLE_SIZE(0x1),
ENABLE_PUSH(0x2),
MAX_CONCURRENT_STREAMS(0x3),
INITIAL_WINDOW_SIZE(0x4),
MAX_FRAME_SIZE(0x5),
MAX_HEADER_LIST_SIZE(0x6);

int code;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ public RawFrame createHeaders(final int streamId, final ByteBuffer payload, fina
@Override
public RawFrame createContinuation(final int streamId, final ByteBuffer payload, final boolean endHeaders) {
Args.positive(streamId, "Stream id");
final int flags = (endHeaders ? FrameFlag.END_HEADERS.value : 0);
final int flags = endHeaders ? FrameFlag.END_HEADERS.value : 0;
return new RawFrame(FrameType.CONTINUATION.getValue(), flags, streamId, payload);
}

@Override
public RawFrame createPushPromise(final int streamId, final ByteBuffer payload, final boolean endHeaders) {
Args.positive(streamId, "Stream id");
final int flags = (endHeaders ? FrameFlag.END_HEADERS.value : 0);
final int flags = endHeaders ? FrameFlag.END_HEADERS.value : 0;
return new RawFrame(FrameType.PUSH_PROMISE.getValue(), flags, streamId, payload);
}

@Override
public RawFrame createData(final int streamId, final ByteBuffer payload, final boolean endStream) {
Args.positive(streamId, "Stream id");
final int flags = (endStream ? FrameFlag.END_STREAM.value : 0);
final int flags = endStream ? FrameFlag.END_STREAM.value : 0;
return new RawFrame(FrameType.DATA.getValue(), flags, streamId, payload);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
*/
public enum FrameFlag {

END_STREAM (0x01),
ACK (0x01),
END_HEADERS (0x04),
PADDED (0x08),
PRIORITY (0x20);
END_STREAM(0x01),
ACK(0x01),
END_HEADERS(0x04),
PADDED(0x08),
PRIORITY(0x20);

final int value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
*/
public enum FrameType {

DATA (0x00),
HEADERS (0x01),
PRIORITY (0x02),
RST_STREAM (0x03),
SETTINGS (0x04),
PUSH_PROMISE (0x05),
PING (0x06),
GOAWAY (0x07),
WINDOW_UPDATE (0x08),
CONTINUATION (0x09);
DATA(0x00),
HEADERS(0x01),
PRIORITY(0x02),
RST_STREAM(0x03),
SETTINGS(0x04),
PUSH_PROMISE(0x05),
PING(0x06),
GOAWAY(0x07),
WINDOW_UPDATE(0x08),
CONTINUATION(0x09);

int value;

Expand Down
Loading