Top Fields Constructors Methods
io.undertow.servlet.compat.rewrite

public Class RewriteHandler

extends Object
implements HttpHandler
Class Inheritance
All Implemented Interfaces
io.undertow.server.HttpHandler
Imports
io.undertow.UndertowOptions, io.undertow.server.HttpHandler, .HttpServerExchange, io.undertow.servlet.UndertowServletLogger, io.undertow.servlet.handlers.ServletRequestContext, io.undertow.servlet.spec.HttpServletRequestImpl, .HttpServletResponseImpl, io.undertow.util.Headers, .QueryParameterUtils, java.nio.charset.StandardCharsets, java.util.HashMap, .Map, jakarta.servlet.http.Cookie, .HttpServletResponse

Author
Remy Maucherat

Field Summary

Modifier and TypeField and Description
private final RewriteConfig
protected ThreadLocal<Boolean>
invoked

If rewriting occurs, the whole request will be processed again.

private final HttpHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
handleRequest(HttpServerExchange
the HTTP request/response exchange
exchange
)

Implements io.undertow.server.HttpHandler.handleRequest.

Handle the request.

protected static boolean
hasScheme(StringBuilder uri)

Determine if a URI string has a scheme component.

private static boolean
isSchemeChar(char c)

Determine if the character is allowed in the scheme of a URI.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configback to summary
private final RewriteConfig config
invokedback to summary
protected ThreadLocal<Boolean> invoked

If rewriting occurs, the whole request will be processed again.

nextback to summary
private final HttpHandler next

Constructor Detail

RewriteHandlerback to summary
public RewriteHandler(RewriteConfig config, HttpHandler next)

Method Detail

handleRequestback to summary
public void handleRequest(HttpServerExchange exchange) throws Exception

Implements io.undertow.server.HttpHandler.handleRequest.

Doc from io.undertow.server.HttpHandler.handleRequest.

Handle the request.

Parameters
exchange:HttpServerExchange

the HTTP request/response exchange

hasSchemeback to summary
protected static boolean hasScheme(StringBuilder uri)

Determine if a URI string has a scheme component.

isSchemeCharback to summary
private static boolean isSchemeChar(char c)

Determine if the character is allowed in the scheme of a URI. See RFC 2396, Section 3.1