Java Code Examples for io.vertx.core.http.HttpVersion#HTTP_1_1
The following examples show how to use
io.vertx.core.http.HttpVersion#HTTP_1_1 .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpUtils.java From wisdom with Apache License 2.0 | 5 votes |
/** * Checks whether the given request should be closed or not once completed. * * @param request the request * @return {@code true} if the connection is marked as {@literal keep-alive}, and so must not be closed. {@code * false} otherwise. Notice that if not set in the request, the default value depends on the HTTP version. */ public static boolean isKeepAlive(HttpServerRequest request) { String connection = request.headers().get(HeaderNames.CONNECTION); if (connection != null && connection.equalsIgnoreCase(CLOSE)) { return false; } if (request.version() == HttpVersion.HTTP_1_1) { return !CLOSE.equalsIgnoreCase(connection); } else { return KEEP_ALIVE.equalsIgnoreCase(connection); } }
Example 2
Source File: ConfigCenterHttpClientOptionsSPI.java From servicecomb-java-chassis with Apache License 2.0 | 4 votes |
@Override public HttpVersion getHttpVersion() { return HttpVersion.HTTP_1_1; }
Example 3
Source File: ConfigKieHttpClientOptionsSPI.java From servicecomb-java-chassis with Apache License 2.0 | 4 votes |
@Override public HttpVersion getHttpVersion() { return HttpVersion.HTTP_1_1; }
Example 4
Source File: HttpTransportHttpClientOptionsSPI.java From servicecomb-java-chassis with Apache License 2.0 | 4 votes |
@Override public HttpVersion getHttpVersion() { return HttpVersion.HTTP_1_1; }
Example 5
Source File: InterceptorTest.java From vertx-web with Apache License 2.0 | 4 votes |
@Override public HttpVersion version() { return HttpVersion.HTTP_1_1; }