Fix typos in javadocs (#9527)
Motivation: We should have correct docs without typos Modification: Fix typos and spelling Result: More correct docs
This commit is contained in:
parent
b11aba354a
commit
bd8cea644a
@ -274,7 +274,7 @@ public final class HAProxyMessage extends AbstractReferenceCounted {
|
||||
return new HAProxySSLTLV(verify, client, encapsulatedTlvs, rawContent);
|
||||
}
|
||||
return new HAProxySSLTLV(verify, client, Collections.<HAProxyTLV>emptyList(), rawContent);
|
||||
// If we're not dealing with a SSL Type, we can use the same mechanism
|
||||
// If we're not dealing with an SSL Type, we can use the same mechanism
|
||||
case PP2_TYPE_ALPN:
|
||||
case PP2_TYPE_AUTHORITY:
|
||||
case PP2_TYPE_SSL_VERSION:
|
||||
|
@ -132,7 +132,7 @@ public abstract class HttpContentDecoder extends MessageToMessageDecoder<HttpObj
|
||||
copy = new DefaultHttpResponse(r.protocolVersion(), r.status());
|
||||
} else {
|
||||
throw new CodecException("Object of class " + message.getClass().getName() +
|
||||
" is not a HttpRequest or HttpResponse");
|
||||
" is not an HttpRequest or HttpResponse");
|
||||
}
|
||||
copy.headers().set(message.headers());
|
||||
copy.setDecoderResult(message.decoderResult());
|
||||
|
@ -17,7 +17,7 @@ package io.netty.handler.codec.http;
|
||||
|
||||
|
||||
/**
|
||||
* An interface that defines a HTTP message, providing common properties for
|
||||
* An interface that defines an HTTP message, providing common properties for
|
||||
* {@link HttpRequest} and {@link HttpResponse}.
|
||||
*
|
||||
* @see HttpResponse
|
||||
|
@ -281,7 +281,7 @@ public abstract class HttpObjectDecoder extends ByteToMessageDecoder {
|
||||
|
||||
// Check if the buffer is readable first as we use the readable byte count
|
||||
// to create the HttpChunk. This is needed as otherwise we may end up with
|
||||
// create a HttpChunk instance that contains an empty buffer and so is
|
||||
// create an HttpChunk instance that contains an empty buffer and so is
|
||||
// handled like it is the last HttpChunk.
|
||||
//
|
||||
// See https://github.com/netty/netty/issues/433
|
||||
|
@ -518,7 +518,7 @@ public final class HttpUtil {
|
||||
|
||||
/**
|
||||
* Formats the host string of an address so it can be used for computing an HTTP component
|
||||
* such as an URL or a Host header
|
||||
* such as a URL or a Host header
|
||||
*
|
||||
* @param addr the address
|
||||
* @return the formatted String
|
||||
|
@ -266,7 +266,7 @@ public class QueryStringDecoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes a bit of an URL encoded by a browser.
|
||||
* Decodes a bit of a URL encoded by a browser.
|
||||
* <p>
|
||||
* This is equivalent to calling {@link #decodeComponent(String, Charset)}
|
||||
* with the UTF-8 charset (recommended to comply with RFC 3986, Section 2).
|
||||
@ -281,7 +281,7 @@ public class QueryStringDecoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes a bit of an URL encoded by a browser.
|
||||
* Decodes a bit of a URL encoded by a browser.
|
||||
* <p>
|
||||
* The string is expected to be encoded as per RFC 3986, Section 2.
|
||||
* This is the encoding used by JavaScript functions {@code encodeURI}
|
||||
|
@ -26,7 +26,7 @@ import java.net.URLEncoder;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
/**
|
||||
* Creates an URL-encoded URI from a path string and key-value parameter pairs.
|
||||
* Creates a URL-encoded URI from a path string and key-value parameter pairs.
|
||||
* This encoder is for one time use only. Create a new instance for each URI.
|
||||
*
|
||||
* <pre>
|
||||
|
@ -219,7 +219,7 @@ public final class CorsConfig {
|
||||
*
|
||||
* CORS headers are set after a request is processed. This may not always be desired
|
||||
* and this setting will check that the Origin is valid and if it is not valid no
|
||||
* further processing will take place, and a error will be returned to the calling client.
|
||||
* further processing will take place, and an error will be returned to the calling client.
|
||||
*
|
||||
* @return {@code true} if a CORS request should short-circuit upon receiving an invalid Origin header.
|
||||
*/
|
||||
|
@ -341,7 +341,7 @@ public final class CorsConfigBuilder {
|
||||
*
|
||||
* CORS headers are set after a request is processed. This may not always be desired
|
||||
* and this setting will check that the Origin is valid and if it is not valid no
|
||||
* further processing will take place, and a error will be returned to the calling client.
|
||||
* further processing will take place, and an error will be returned to the calling client.
|
||||
*
|
||||
* @return {@link CorsConfigBuilder} to support method chaining.
|
||||
*/
|
||||
|
@ -867,7 +867,7 @@ public class HttpPostRequestEncoder implements ChunkedInput<HttpContent> {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the next ByteBuf to send as a HttpChunk and modifying currentBuffer accordingly
|
||||
* @return the next ByteBuf to send as an HttpChunk and modifying currentBuffer accordingly
|
||||
*/
|
||||
private ByteBuf fillByteBuf() {
|
||||
int length = currentBuffer.readableBytes();
|
||||
|
@ -254,7 +254,7 @@ public abstract class WebSocketClientHandshaker {
|
||||
HttpClientCodec codec = pipeline.get(HttpClientCodec.class);
|
||||
if (codec == null) {
|
||||
promise.setFailure(new IllegalStateException("ChannelPipeline does not contain " +
|
||||
"a HttpResponseDecoder or HttpClientCodec"));
|
||||
"an HttpResponseDecoder or HttpClientCodec"));
|
||||
return promise;
|
||||
}
|
||||
}
|
||||
@ -272,7 +272,7 @@ public abstract class WebSocketClientHandshaker {
|
||||
}
|
||||
if (ctx == null) {
|
||||
promise.setFailure(new IllegalStateException("ChannelPipeline does not contain " +
|
||||
"a HttpRequestEncoder or HttpClientCodec"));
|
||||
"an HttpRequestEncoder or HttpClientCodec"));
|
||||
return;
|
||||
}
|
||||
p.addAfter(ctx.name(), "ws-encoder", newWebSocketEncoder());
|
||||
@ -350,7 +350,7 @@ public abstract class WebSocketClientHandshaker {
|
||||
ctx = p.context(HttpClientCodec.class);
|
||||
if (ctx == null) {
|
||||
throw new IllegalStateException("ChannelPipeline does not contain " +
|
||||
"a HttpRequestEncoder or HttpClientCodec");
|
||||
"an HttpRequestEncoder or HttpClientCodec");
|
||||
}
|
||||
final HttpClientCodec codec = (HttpClientCodec) ctx.handler();
|
||||
// Remove the encoder part of the codec as the user may start writing frames after this method returns.
|
||||
@ -429,7 +429,7 @@ public abstract class WebSocketClientHandshaker {
|
||||
ctx = p.context(HttpClientCodec.class);
|
||||
if (ctx == null) {
|
||||
return promise.setFailure(new IllegalStateException("ChannelPipeline does not contain " +
|
||||
"a HttpResponseDecoder or HttpClientCodec"));
|
||||
"an HttpResponseDecoder or HttpClientCodec"));
|
||||
}
|
||||
}
|
||||
// Add aggregator and ensure we feed the HttpResponse so it is aggregated. A limit of 8192 should be more
|
||||
|
@ -202,7 +202,7 @@ public abstract class WebSocketServerHandshaker {
|
||||
ChannelHandlerContext ctx = p.context(HttpRequestDecoder.class);
|
||||
final String encoderName;
|
||||
if (ctx == null) {
|
||||
// this means the user use a HttpServerCodec
|
||||
// this means the user use an HttpServerCodec
|
||||
ctx = p.context(HttpServerCodec.class);
|
||||
if (ctx == null) {
|
||||
promise.setFailure(
|
||||
@ -276,7 +276,7 @@ public abstract class WebSocketServerHandshaker {
|
||||
ChannelPipeline p = channel.pipeline();
|
||||
ChannelHandlerContext ctx = p.context(HttpRequestDecoder.class);
|
||||
if (ctx == null) {
|
||||
// this means the user use a HttpServerCodec
|
||||
// this means the user use an HttpServerCodec
|
||||
ctx = p.context(HttpServerCodec.class);
|
||||
if (ctx == null) {
|
||||
promise.setFailure(
|
||||
|
@ -193,7 +193,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder<SpdyFrame> {
|
||||
// SYN_STREAM frames initiated by the client are HTTP requests
|
||||
|
||||
// If a client sends a request with a truncated header block, the server must
|
||||
// reply with a HTTP 431 REQUEST HEADER FIELDS TOO LARGE reply.
|
||||
// reply with an HTTP 431 REQUEST HEADER FIELDS TOO LARGE reply.
|
||||
if (spdySynStreamFrame.isTruncated()) {
|
||||
SpdySynReplyFrame spdySynReplyFrame = new DefaultSpdySynReplyFrame(streamId);
|
||||
spdySynReplyFrame.setLast(true);
|
||||
@ -218,7 +218,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder<SpdyFrame> {
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
// If a client sends a SYN_STREAM without all of the getMethod, url (host and path),
|
||||
// scheme, and version headers the server must reply with a HTTP 400 BAD REQUEST reply.
|
||||
// scheme, and version headers the server must reply with an HTTP 400 BAD REQUEST reply.
|
||||
// Also sends HTTP 400 BAD REQUEST reply if header name/value pairs are invalid
|
||||
SpdySynReplyFrame spdySynReplyFrame = new DefaultSpdySynReplyFrame(streamId);
|
||||
spdySynReplyFrame.setLast(true);
|
||||
|
@ -197,7 +197,7 @@ public class HttpObjectAggregatorTest {
|
||||
|
||||
@Test
|
||||
public void testOversizedRequestWithoutKeepAlive() {
|
||||
// send a HTTP/1.0 request with no keep-alive header
|
||||
// send an HTTP/1.0 request with no keep-alive header
|
||||
HttpRequest message = new DefaultHttpRequest(HttpVersion.HTTP_1_0, HttpMethod.PUT, "http://localhost");
|
||||
HttpUtil.setContentLength(message, 5);
|
||||
checkOversizedRequest(message);
|
||||
|
@ -145,7 +145,7 @@ public class HttpRequestDecoderTest {
|
||||
amount = headerLength - a;
|
||||
}
|
||||
|
||||
// if header is done it should produce a HttpRequest
|
||||
// if header is done it should produce an HttpRequest
|
||||
channel.writeInbound(Unpooled.copiedBuffer(content, a, amount));
|
||||
a += amount;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ public class HttpResponseDecoderTest {
|
||||
amount = headerLength - a;
|
||||
}
|
||||
|
||||
// if header is done it should produce a HttpRequest
|
||||
// if header is done it should produce an HttpRequest
|
||||
boolean headerDone = a + amount == headerLength;
|
||||
assertEquals(headerDone, ch.writeInbound(Unpooled.copiedBuffer(content, a, amount)));
|
||||
a += amount;
|
||||
|
@ -85,7 +85,7 @@ public abstract class AbstractHttp2ConnectionHandlerBuilder<T extends Http2Conne
|
||||
private boolean decoupleCloseAndGoAway;
|
||||
|
||||
// The property that will prohibit connection() and codec() if set by server(),
|
||||
// because this property is used only when this builder creates a Http2Connection.
|
||||
// because this property is used only when this builder creates an Http2Connection.
|
||||
private Boolean isServer;
|
||||
private Integer maxReservedStreams;
|
||||
|
||||
@ -552,7 +552,7 @@ public abstract class AbstractHttp2ConnectionHandlerBuilder<T extends Http2Conne
|
||||
} catch (Throwable t) {
|
||||
encoder.close();
|
||||
decoder.close();
|
||||
throw new IllegalStateException("failed to build a Http2ConnectionHandler", t);
|
||||
throw new IllegalStateException("failed to build an Http2ConnectionHandler", t);
|
||||
}
|
||||
|
||||
// Setup post build options
|
||||
|
@ -36,7 +36,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
|
||||
|
||||
/**
|
||||
* A HTTP2 frame listener that will decompress data frames according to the {@code content-encoding} header for each
|
||||
* An HTTP2 frame listener that will decompress data frames according to the {@code content-encoding} header for each
|
||||
* stream. The decompression provided by this class will be applied to the data for the entire stream.
|
||||
*/
|
||||
@UnstableApi
|
||||
|
@ -97,7 +97,7 @@ public class Http2Exception extends Exception {
|
||||
* @param error The type of error as defined by the HTTP/2 specification.
|
||||
* @param fmt String with the content and format for the additional debug data.
|
||||
* @param args Objects which fit into the format defined by {@code fmt}.
|
||||
* @return An exception which can be translated into a HTTP/2 error.
|
||||
* @return An exception which can be translated into an HTTP/2 error.
|
||||
*/
|
||||
public static Http2Exception connectionError(Http2Error error, String fmt, Object... args) {
|
||||
return new Http2Exception(error, String.format(fmt, args));
|
||||
@ -110,7 +110,7 @@ public class Http2Exception extends Exception {
|
||||
* @param cause The object which caused the error.
|
||||
* @param fmt String with the content and format for the additional debug data.
|
||||
* @param args Objects which fit into the format defined by {@code fmt}.
|
||||
* @return An exception which can be translated into a HTTP/2 error.
|
||||
* @return An exception which can be translated into an HTTP/2 error.
|
||||
*/
|
||||
public static Http2Exception connectionError(Http2Error error, Throwable cause,
|
||||
String fmt, Object... args) {
|
||||
@ -123,7 +123,7 @@ public class Http2Exception extends Exception {
|
||||
* @param error The type of error as defined by the HTTP/2 specification.
|
||||
* @param fmt String with the content and format for the additional debug data.
|
||||
* @param args Objects which fit into the format defined by {@code fmt}.
|
||||
* @return An exception which can be translated into a HTTP/2 error.
|
||||
* @return An exception which can be translated into an HTTP/2 error.
|
||||
*/
|
||||
public static Http2Exception closedStreamError(Http2Error error, String fmt, Object... args) {
|
||||
return new ClosedStreamCreationException(error, String.format(fmt, args));
|
||||
|
@ -45,8 +45,8 @@ import static io.netty.handler.codec.http2.Http2Error.NO_ERROR;
|
||||
* <p><em>This API is very immature.</em> The Http2Connection-based API is currently preferred over this API.
|
||||
* This API is targeted to eventually replace or reduce the need for the {@link Http2ConnectionHandler} API.
|
||||
*
|
||||
* <p>A HTTP/2 handler that maps HTTP/2 frames to {@link Http2Frame} objects and vice versa. For every incoming HTTP/2
|
||||
* frame, a {@link Http2Frame} object is created and propagated via {@link #channelRead}. Outbound {@link Http2Frame}
|
||||
* <p>An HTTP/2 handler that maps HTTP/2 frames to {@link Http2Frame} objects and vice versa. For every incoming HTTP/2
|
||||
* frame, an {@link Http2Frame} object is created and propagated via {@link #channelRead}. Outbound {@link Http2Frame}
|
||||
* objects received via {@link #write} are converted to the HTTP/2 wire format. HTTP/2 frames specific to a stream
|
||||
* implement the {@link Http2StreamFrame} interface. The {@link Http2FrameCodec} is instantiated using the
|
||||
* {@link Http2FrameCodecBuilder}. It's recommended for channel handlers to inherit from the
|
||||
@ -79,7 +79,7 @@ import static io.netty.handler.codec.http2.Http2Error.NO_ERROR;
|
||||
*
|
||||
* <h3>New inbound Streams</h3>
|
||||
*
|
||||
* The first frame of a HTTP/2 stream must be a {@link Http2HeadersFrame}, which will have a {@link Http2FrameStream}
|
||||
* The first frame of an HTTP/2 stream must be an {@link Http2HeadersFrame}, which will have an {@link Http2FrameStream}
|
||||
* object attached.
|
||||
*
|
||||
* <h3>New outbound Streams</h3>
|
||||
|
@ -36,14 +36,14 @@ public class Http2FrameCodecBuilder extends
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a builder for a HTTP/2 client.
|
||||
* Creates a builder for an HTTP/2 client.
|
||||
*/
|
||||
public static Http2FrameCodecBuilder forClient() {
|
||||
return new Http2FrameCodecBuilder(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a builder for a HTTP/2 server.
|
||||
* Creates a builder for an HTTP/2 server.
|
||||
*/
|
||||
public static Http2FrameCodecBuilder forServer() {
|
||||
return new Http2FrameCodecBuilder(true);
|
||||
|
@ -20,7 +20,7 @@ import io.netty.handler.codec.http2.Http2Stream.State;
|
||||
import io.netty.util.internal.UnstableApi;
|
||||
|
||||
/**
|
||||
* A single stream within a HTTP/2 connection. To be used with the {@link Http2FrameCodec}.
|
||||
* A single stream within an HTTP/2 connection. To be used with the {@link Http2FrameCodec}.
|
||||
*/
|
||||
@UnstableApi
|
||||
public interface Http2FrameStream {
|
||||
|
@ -21,7 +21,7 @@ import io.netty.util.internal.UnstableApi;
|
||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||
|
||||
/**
|
||||
* A HTTP/2 exception for a specific {@link Http2FrameStream}.
|
||||
* An HTTP/2 exception for a specific {@link Http2FrameStream}.
|
||||
*/
|
||||
@UnstableApi
|
||||
public final class Http2FrameStreamException extends Exception {
|
||||
|
@ -57,7 +57,7 @@ public class Http2MultiplexCodecBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a builder for a HTTP/2 client.
|
||||
* Creates a builder for an HTTP/2 client.
|
||||
*
|
||||
* @param childHandler the handler added to channels for remotely-created streams. It must be
|
||||
* {@link ChannelHandler.Sharable}.
|
||||
@ -67,7 +67,7 @@ public class Http2MultiplexCodecBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a builder for a HTTP/2 server.
|
||||
* Creates a builder for an HTTP/2 server.
|
||||
*
|
||||
* @param childHandler the handler added to channels for remotely-created streams. It must be
|
||||
* {@link ChannelHandler.Sharable}.
|
||||
|
@ -122,28 +122,28 @@ public final class HttpConversionUtil {
|
||||
*/
|
||||
public enum ExtensionHeaderNames {
|
||||
/**
|
||||
* HTTP extension header which will identify the stream id from the HTTP/2 event(s) responsible for generating a
|
||||
* {@code HttpObject}
|
||||
* HTTP extension header which will identify the stream id from the HTTP/2 event(s) responsible for
|
||||
* generating an {@code HttpObject}
|
||||
* <p>
|
||||
* {@code "x-http2-stream-id"}
|
||||
*/
|
||||
STREAM_ID("x-http2-stream-id"),
|
||||
/**
|
||||
* HTTP extension header which will identify the scheme pseudo header from the HTTP/2 event(s) responsible for
|
||||
* generating a {@code HttpObject}
|
||||
* generating an {@code HttpObject}
|
||||
* <p>
|
||||
* {@code "x-http2-scheme"}
|
||||
*/
|
||||
SCHEME("x-http2-scheme"),
|
||||
/**
|
||||
* HTTP extension header which will identify the path pseudo header from the HTTP/2 event(s) responsible for
|
||||
* generating a {@code HttpObject}
|
||||
* generating an {@code HttpObject}
|
||||
* <p>
|
||||
* {@code "x-http2-path"}
|
||||
*/
|
||||
PATH("x-http2-path"),
|
||||
/**
|
||||
* HTTP extension header which will identify the stream id used to create this stream in a HTTP/2 push promise
|
||||
* HTTP extension header which will identify the stream id used to create this stream in an HTTP/2 push promise
|
||||
* frame
|
||||
* <p>
|
||||
* {@code "x-http2-stream-promise-id"}
|
||||
@ -158,7 +158,7 @@ public final class HttpConversionUtil {
|
||||
STREAM_DEPENDENCY_ID("x-http2-stream-dependency-id"),
|
||||
/**
|
||||
* HTTP extension header which will identify the weight (if non-default and the priority is not on the default
|
||||
* stream) of the associated HTTP/2 stream responsible responsible for generating a {@code HttpObject}
|
||||
* stream) of the associated HTTP/2 stream responsible responsible for generating an {@code HttpObject}
|
||||
* <p>
|
||||
* {@code "x-http2-stream-weight"}
|
||||
*/
|
||||
@ -519,7 +519,7 @@ public final class HttpConversionUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a HTTP/2 {code :path} from a URI in accordance with
|
||||
* Generate an HTTP/2 {code :path} from a URI in accordance with
|
||||
* <a href="https://tools.ietf.org/html/rfc7230#section-5.3">rfc7230, 5.3</a>.
|
||||
*/
|
||||
private static AsciiString toHttp2Path(URI uri) {
|
||||
|
@ -394,7 +394,7 @@ public abstract class Http2MultiplexTest<C extends Http2FrameCodec> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A child channel for a HTTP/2 stream in IDLE state (that is no headers sent or received),
|
||||
* A child channel for an HTTP/2 stream in IDLE state (that is no headers sent or received),
|
||||
* should not emit a RST_STREAM frame on close, as this is a connection error of type protocol error.
|
||||
*/
|
||||
@Test
|
||||
|
@ -27,7 +27,7 @@ import io.netty.handler.ssl.SslContextBuilder;
|
||||
import io.netty.handler.ssl.util.SelfSignedCertificate;
|
||||
|
||||
/**
|
||||
* A HTTP server showing how to use the HTTP multipart package for file uploads and decoding post data.
|
||||
* An HTTP server showing how to use the HTTP multipart package for file uploads and decoding post data.
|
||||
*/
|
||||
public final class HttpUploadServer {
|
||||
|
||||
|
@ -142,9 +142,9 @@ public class HttpUploadServerHandler extends SimpleChannelInboundHandler<HttpObj
|
||||
}
|
||||
responseContent.append("\r\n\r\n");
|
||||
|
||||
// if GET Method: should not try to create a HttpPostRequestDecoder
|
||||
// if GET Method: should not try to create an HttpPostRequestDecoder
|
||||
if (HttpMethod.GET.equals(request.method())) {
|
||||
// GET Method: should not try to create a HttpPostRequestDecoder
|
||||
// GET Method: should not try to create an HttpPostRequestDecoder
|
||||
// So stop here
|
||||
responseContent.append("\r\n\r\nEND OF GET CONTENT\r\n");
|
||||
// Not now: LastHttpContent will be sent writeResponse(ctx.channel());
|
||||
|
@ -27,7 +27,7 @@ import io.netty.handler.ssl.SslContextBuilder;
|
||||
import io.netty.handler.ssl.util.SelfSignedCertificate;
|
||||
|
||||
/**
|
||||
* A HTTP server which serves Web Socket requests at:
|
||||
* An HTTP server which serves Web Socket requests at:
|
||||
*
|
||||
* http://localhost:8080/websocket
|
||||
*
|
||||
|
@ -38,7 +38,7 @@ import io.netty.handler.ssl.SupportedCipherSuiteFilter;
|
||||
import io.netty.handler.ssl.util.SelfSignedCertificate;
|
||||
|
||||
/**
|
||||
* A HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
|
||||
* An HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
|
||||
* server with the example client.
|
||||
*
|
||||
* <p>This example is making use of the "multiplexing" http2 API, where streams are mapped to child
|
||||
|
@ -38,7 +38,7 @@ import io.netty.handler.ssl.SupportedCipherSuiteFilter;
|
||||
import io.netty.handler.ssl.util.SelfSignedCertificate;
|
||||
|
||||
/**
|
||||
* A HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
|
||||
* An HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
|
||||
* server with the example client.
|
||||
*
|
||||
* <p>This example is making use of the "multiplexing" http2 API, where streams are mapped to child
|
||||
|
@ -38,7 +38,7 @@ import io.netty.handler.ssl.SupportedCipherSuiteFilter;
|
||||
import io.netty.handler.ssl.util.SelfSignedCertificate;
|
||||
|
||||
/**
|
||||
* A HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
|
||||
* An HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
|
||||
* server with the example client.
|
||||
*/
|
||||
public final class Http2Server {
|
||||
|
@ -40,7 +40,7 @@ import java.security.cert.CertificateException;
|
||||
import javax.net.ssl.SSLException;
|
||||
|
||||
/**
|
||||
* Demonstrates a Http2 server using Netty to display a bunch of images and
|
||||
* Demonstrates an Http2 server using Netty to display a bunch of images and
|
||||
* simulate latency. It is a Netty version of the <a href="https://http2.golang.org/gophertiles?latency=0">
|
||||
* Go lang HTTP2 tiles demo</a>.
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@ import io.netty.handler.logging.LogLevel;
|
||||
import io.netty.handler.logging.LoggingHandler;
|
||||
|
||||
/**
|
||||
* Demonstrates a http server using Netty to display a bunch of images, simulate
|
||||
* Demonstrates an http server using Netty to display a bunch of images, simulate
|
||||
* latency and compare it against the http2 implementation.
|
||||
*/
|
||||
public final class HttpServer {
|
||||
|
@ -58,8 +58,8 @@ import io.netty.util.ReferenceCountUtil;
|
||||
import io.netty.util.concurrent.Promise;
|
||||
|
||||
/**
|
||||
* This is a very simple example for a HTTPS client that uses OCSP stapling.
|
||||
* The client connects to a HTTPS server that has OCSP stapling enabled and
|
||||
* This is a very simple example for an HTTPS client that uses OCSP stapling.
|
||||
* The client connects to an HTTPS server that has OCSP stapling enabled and
|
||||
* then uses BC to parse and validate it.
|
||||
*/
|
||||
public class OcspClientExample {
|
||||
|
@ -71,7 +71,7 @@ public class OcspServerExample {
|
||||
X509Certificate issuer = keyCertChain[keyCertChain.length - 1];
|
||||
|
||||
// Step 2: We need the URL of the CA's OCSP responder server. It's somewhere encoded
|
||||
// into the certificate! Notice that it's a HTTP URL.
|
||||
// into the certificate! Notice that it's an HTTP URL.
|
||||
URI uri = OcspUtils.ocspUri(certificate);
|
||||
System.out.println("OCSP Responder URI: " + uri);
|
||||
|
||||
|
@ -37,7 +37,7 @@ import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
* many events as they like for any given input. A channel's auto reading configuration doesn't usually
|
||||
* apply in these scenarios. This is causing problems in downstream {@link ChannelHandler}s that would
|
||||
* like to hold subsequent events while they're processing one event. It's a common problem with the
|
||||
* {@code HttpObjectDecoder} that will very often fire a {@code HttpRequest} that is immediately followed
|
||||
* {@code HttpObjectDecoder} that will very often fire an {@code HttpRequest} that is immediately followed
|
||||
* by a {@code LastHttpContent} event.
|
||||
*
|
||||
* <pre>{@code
|
||||
|
@ -85,7 +85,7 @@ public abstract class ApplicationProtocolNegotiationHandler extends ChannelInbou
|
||||
if (handshakeEvent.isSuccess()) {
|
||||
SslHandler sslHandler = ctx.pipeline().get(SslHandler.class);
|
||||
if (sslHandler == null) {
|
||||
throw new IllegalStateException("cannot find a SslHandler in the pipeline (required for "
|
||||
throw new IllegalStateException("cannot find an SslHandler in the pipeline (required for "
|
||||
+ "application-level protocol negotiation)");
|
||||
}
|
||||
String protocol = sslHandler.applicationProtocol();
|
||||
|
@ -497,7 +497,7 @@ public class OpenSslEngineTest extends SSLEngineTest {
|
||||
|
||||
ByteBuffer empty = allocateBuffer(0);
|
||||
ByteBuffer dst = allocateBuffer(clientEngine.getSession().getPacketBufferSize());
|
||||
// Limit to something that is guaranteed to be too small to hold a SSL Record.
|
||||
// Limit to something that is guaranteed to be too small to hold an SSL Record.
|
||||
dst.limit(1);
|
||||
|
||||
// As we called closeOutbound() before this should produce a BUFFER_OVERFLOW.
|
||||
|
@ -2285,7 +2285,7 @@ public abstract class SSLEngineTest {
|
||||
assertTrue(client.isOutboundDone());
|
||||
assertTrue(client.isInboundDone());
|
||||
|
||||
// Ensure that calling wrap or unwrap again will not produce a SSLException
|
||||
// Ensure that calling wrap or unwrap again will not produce an SSLException
|
||||
encryptedServerToClient.clear();
|
||||
plainServerOut.clear();
|
||||
|
||||
|
@ -98,7 +98,7 @@ public class HttpRequestDecoderBenchmark extends AbstractMicrobenchmark {
|
||||
amount = headerLength - a;
|
||||
}
|
||||
|
||||
// if header is done it should produce a HttpRequest
|
||||
// if header is done it should produce an HttpRequest
|
||||
channel.writeInbound(Unpooled.wrappedBuffer(content, a, amount).asReadOnly());
|
||||
a += amount;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import io.netty.handler.logging.LogLevel;
|
||||
import io.netty.handler.logging.LoggingHandler;
|
||||
|
||||
/**
|
||||
* A HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
|
||||
* An HTTP/2 Server that responds to requests with a Hello World. Once started, you can test the
|
||||
* server with the example client.
|
||||
*/
|
||||
public final class Http2Server {
|
||||
|
Loading…
Reference in New Issue
Block a user