-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the server upgrades an HTTP/1.1 connection to H2C, it forwards i…
…nbound HTTP messages to the H2 encoder and updates the frame controller with the received amount of bytes. Actually such messages are not taken in account by the H2 flow controller and therefore when the window size becomes zero, it will not process message anymore. This impacts HTTP/1.1 upgrades to H2C sending messages payload greater than the flow control window size. The VertxHttp2ConnectionHandler has been updated to not account for received HTTP/1.1 bytes.
- Loading branch information
Showing
3 changed files
with
30 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/test/java/io/vertx/core/http/Http2WithUpgradeServerFileUploadTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2011-2019 Contributors to the Eclipse Foundation | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
*/ | ||
package io.vertx.core.http; | ||
|
||
/** | ||
*/ | ||
public class Http2WithUpgradeServerFileUploadTest extends HttpServerFileUploadTest { | ||
|
||
@Override | ||
protected HttpClientOptions createBaseClientOptions() { | ||
return new HttpClientOptions() | ||
.setProtocolVersion(HttpVersion.HTTP_2) | ||
.setHttp2ClearTextUpgrade(true); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters