From 05bbecff49062bbdb41c814705b0d8449c78798b Mon Sep 17 00:00:00 2001 From: Idel Pivnitskiy Date: Thu, 22 Aug 2019 04:59:08 -0700 Subject: [PATCH] Update links to the latest HTTP/2 specifications (#9493) Motivation: Some of the links in javadoc point to the obsolete drafts of HTTP/2 specifications. We should point them to the latest RFC 7540 or 7541. Modifications: Update links from `draft-ietf-httpbis-*` to the `rfc7540` and `rfc7541`. Result: Correct links in javadoc. --- .../io/netty/handler/codec/http/HttpResponseStatus.java | 2 +- .../io/netty/handler/codec/http2/Http2FrameListener.java | 2 +- .../io/netty/handler/codec/http2/Http2HeadersEncoder.java | 7 ++++--- .../handler/codec/http2/Http2PromisedRequestVerifier.java | 4 ++-- .../io/netty/handler/codec/http2/Http2SecurityUtil.java | 2 +- .../io/netty/handler/codec/http2/HttpConversionUtil.java | 8 ++++---- .../handler/codec/http2/InboundHttp2ToHttpAdapter.java | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseStatus.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseStatus.java index 2f117fabbb..0a3db9f6ac 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseStatus.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpResponseStatus.java @@ -225,7 +225,7 @@ public class HttpResponseStatus implements Comparable { /** * 421 Misdirected Request * - * 421 Status Code + * @see 421 (Misdirected Request) Status Code */ public static final HttpResponseStatus MISDIRECTED_REQUEST = newStatus(421, "Misdirected Request"); diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameListener.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameListener.java index e48923b537..c8d3518478 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameListener.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameListener.java @@ -160,7 +160,7 @@ public interface Http2FrameListener { * Handles an inbound {@code PUSH_PROMISE} frame. Only called if {@code END_HEADERS} encountered. *

* Promised requests MUST be authoritative, cacheable, and safe. - * See [RFC http2], Section 8.2. + * See [RFC 7540], Section 8.2. *

* Only one of the following methods will be called for each {@code HEADERS} frame sequence. * One will be called when the {@code END_HEADERS} flag has been received. diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2HeadersEncoder.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2HeadersEncoder.java index 50bedb227d..f644aa3b86 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2HeadersEncoder.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2HeadersEncoder.java @@ -57,17 +57,18 @@ public interface Http2HeadersEncoder { /** * Determine if a header name/value pair is treated as - * sensitive. + * sensitive. * If the object can be dynamically modified and shared across multiple connections it may need to be thread safe. */ interface SensitivityDetector { /** * Determine if a header {@code name}/{@code value} pair should be treated as - * sensitive. + * sensitive. + * * @param name The name for the header. * @param value The value of the header. * @return {@code true} if a header {@code name}/{@code value} pair should be treated as - * sensitive. + * sensitive. * {@code false} otherwise. */ boolean isSensitive(CharSequence name, CharSequence value); diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2PromisedRequestVerifier.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2PromisedRequestVerifier.java index 43b8f078c2..fc8e65c6c3 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2PromisedRequestVerifier.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2PromisedRequestVerifier.java @@ -19,7 +19,7 @@ import io.netty.util.internal.UnstableApi; /** * Provides an extensibility point for users to define the validity of push requests. - * @see [RFC http2], Section 8.2. + * @see [RFC 7540], Section 8.2. */ @UnstableApi public interface Http2PromisedRequestVerifier { @@ -29,7 +29,7 @@ public interface Http2PromisedRequestVerifier { * @param headers The headers to be verified. * @return {@code true} if the {@code ctx} is authoritative for the {@code headers}, {@code false} otherwise. * @see - * [RFC http2], Section 10.1. + * [RFC 7540], Section 10.1. */ boolean isAuthoritative(ChannelHandlerContext ctx, Http2Headers headers); diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2SecurityUtil.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2SecurityUtil.java index 0ecd2c058e..4c6abd8ac8 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2SecurityUtil.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2SecurityUtil.java @@ -33,7 +33,7 @@ public final class Http2SecurityUtil { * Ciphers and Mozilla Modern Cipher * Suites in accordance with the HTTP/2 Specification. + * href="https://tools.ietf.org/html/rfc7540#section-9.2.2">HTTP/2 Specification. * * According to the * JSSE documentation "the names mentioned in the TLS RFCs prefixed with TLS_ are functionally equivalent diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java index d986bbe5be..40d222ac6b 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java @@ -92,24 +92,24 @@ public final class HttpConversionUtil { /** * This will be the method used for {@link HttpRequest} objects generated out of the HTTP message flow defined in HTTP/2 Spec Message Flow + * href="https://tools.ietf.org/html/rfc7540#section-8.1">[RFC 7540], Section 8.1 */ public static final HttpMethod OUT_OF_MESSAGE_SEQUENCE_METHOD = HttpMethod.OPTIONS; /** * This will be the path used for {@link HttpRequest} objects generated out of the HTTP message flow defined in HTTP/2 Spec Message Flow + * href="https://tools.ietf.org/html/rfc7540#section-8.1">[RFC 7540], Section 8.1 */ public static final String OUT_OF_MESSAGE_SEQUENCE_PATH = ""; /** * This will be the status code used for {@link HttpResponse} objects generated out of the HTTP message flow defined - * in HTTP/2 Spec Message Flow + * in [RFC 7540], Section 8.1 */ public static final HttpResponseStatus OUT_OF_MESSAGE_SEQUENCE_RETURN_CODE = HttpResponseStatus.OK; /** - * rfc7540, 8.1.2.3 states the path must not + * [RFC 7540], 8.1.2.3 states the path must not * be empty, and instead should be {@code /}. */ private static final AsciiString EMPTY_REQUEST_PATH = AsciiString.cached("/"); diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java index edae93ae6f..266213584f 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java @@ -34,7 +34,7 @@ import static java.util.Objects.requireNonNull; /** * This adapter provides just header/data events from the HTTP message flow defined - * here HTTP/2 Spec Message Flow. + * in [RFC 7540], Section 8.1. *

* See {@link HttpToHttp2ConnectionHandler} to get translation from HTTP/1.x objects to HTTP/2 frames for writes. */