io.undertow.server.handlers.HttpContinueReadHandler Java Examples

The following examples show how to use io.undertow.server.handlers.HttpContinueReadHandler. 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: UndertowHTTPServerEngine.java    From cxf with Apache License 2.0 5 votes vote down vote up
private Undertow createServer(URL url, UndertowHTTPHandler undertowHTTPHandler) throws Exception {
    Undertow.Builder result = Undertow.builder();
    result.setServerOption(UndertowOptions.IDLE_TIMEOUT, getMaxIdleTime());
    if (this.shouldEnableHttp2(undertowHTTPHandler.getBus())) {
        result.setServerOption(UndertowOptions.ENABLE_HTTP2, Boolean.TRUE);
    }
    if (tlsServerParameters != null) {
        if (this.sslContext == null) {
            this.sslContext = createSSLContext();
        }
        result = result.addHttpsListener(getPort(), getHost(), this.sslContext);
    } else {
        result = result.addHttpListener(getPort(), getHost());
    }
    path = Handlers.path(new NotFoundHandler());

    if (url.getPath().length() == 0) {
        result = result.setHandler(Handlers.trace(undertowHTTPHandler));
    } else {
        if (undertowHTTPHandler.isContextMatchExact()) {
            path.addExactPath(url.getPath(), undertowHTTPHandler);
        } else {
            path.addPrefixPath(url.getPath(), undertowHTTPHandler);
        }

        result = result.setHandler(wrapHandler(new HttpContinueReadHandler(path)));
    }

    result = decorateUndertowSocketConnection(result);
    result = disableSSLv3(result);
    result = configureThreads(result);
    return result.build();
}
 
Example #2
Source File: Handlers.java    From quarkus-http with Apache License 2.0 2 votes vote down vote up
/**
 * A handler that automatically handles HTTP 100-continue responses, by sending a continue
 * response when the first attempt is made to read from the request channel.
 *
 * @param next The next handler in the chain
 * @return A new continue handler
 */
public static HttpContinueReadHandler httpContinueRead(final HttpHandler next) {
    return new HttpContinueReadHandler(next);
}
 
Example #3
Source File: Handlers.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * A handler that automatically handles HTTP 100-continue responses, by sending a continue
 * response when the first attempt is made to read from the request channel.
 *
 * @param next The next handler in the chain
 * @return A new continue handler
 */
public static final HttpContinueReadHandler httpContinueRead(final HttpHandler next) {
    return new HttpContinueReadHandler(next);
}