upgradeExpect() — netty Function Reference
Architecture documentation for the upgradeExpect() function in HttpServerUpgradeHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5bdf641b_33aa_9377_7274_b133552ee57a["upgradeExpect()"] b1c607f7_af7c_9e8d_7626_d168a967f7a0["HttpServerUpgradeHandlerTest"] 5bdf641b_33aa_9377_7274_b133552ee57a -->|defined in| b1c607f7_af7c_9e8d_7626_d168a967f7a0 style 5bdf641b_33aa_9377_7274_b133552ee57a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpServerUpgradeHandlerTest.java lines 235–262
@Test
public void upgradeExpect() {
final HttpServerCodec httpServerCodec = new HttpServerCodec();
final UpgradeCodecFactory factory = new UpgradeCodecFactory() {
@Override
public UpgradeCodec newUpgradeCodec(CharSequence protocol) {
return new TestUpgradeCodec();
}
};
HttpServerUpgradeHandler upgradeHandler = new HttpServerUpgradeHandler(httpServerCodec, factory);
EmbeddedChannel channel = new EmbeddedChannel(httpServerCodec, upgradeHandler);
// Build a h2c upgrade request, but without connection header.
String upgradeString = "GET / HTTP/1.1\r\n" +
"Expect: foo\r\n" +
"Upgrade: h2c\r\n" +
"\r\n" +
"GET / HTTP/1.1\r\n" +
"Content-Length: 0\r\n" +
"\r\n";
ByteBuf upgrade = Unpooled.copiedBuffer(upgradeString, CharsetUtil.US_ASCII);
assertTrue(channel.writeInbound(upgrade));
channel.checkException();
assertTrue(channel.finishAndReleaseAll());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does upgradeExpect() do?
upgradeExpect() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpServerUpgradeHandlerTest.java.
Where is upgradeExpect() defined?
upgradeExpect() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpServerUpgradeHandlerTest.java at line 235.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free