| java.lang.Object org.apache.coyote.tomcat4.CoyoteAdapter
CoyoteAdapter | final class CoyoteAdapter implements Adapter(Code) | | Implementation of a request processor which delegates the processing to a
Coyote processor.
author: Craig R. McClanahan author: Remy Maucherat version: $Revision: 1.28 $ $Date: 2004/04/04 19:09:38 $ |
Field Summary | |
final public static int | ADAPTER_NOTES | protected StringManager | sm The string manager for this package. |
Constructor Summary | |
public | CoyoteAdapter(CoyoteConnector connector) Construct a new CoyoteProcessor associated with the specified connector. |
Method Summary | |
protected void | convertURI(MessageBytes uri, CoyoteRequest request) Character conversion of the URI. | protected static void | copyBytes(byte[] b, int dest, int src, int len) Copy an array of bytes to a different position. | protected void | log(String message) | protected void | log(String message, Throwable throwable) | public static boolean | normalize(MessageBytes uriMB) Normalize URI.
This method normalizes "\", "//", "/./" and "/../". | protected void | parseCookies(Request req, CoyoteRequest request) Parse cookies. | protected void | parseSessionId(Request req, CoyoteRequest request) Parse session id in URL. | protected void | postParseRequest(Request req, CoyoteRequest request, Response res, CoyoteResponse response) Parse additional request parameters. | public void | service(Request req, Response res) Service method. | protected static String | validate(String path) Return a context-relative path, beginning with a "/", that represents
the canonical version of the specified path after ".." and "." elements
are resolved out. |
ADAPTER_NOTES | final public static int ADAPTER_NOTES(Code) | | |
sm | protected StringManager sm(Code) | | The string manager for this package.
|
CoyoteAdapter | public CoyoteAdapter(CoyoteConnector connector)(Code) | | Construct a new CoyoteProcessor associated with the specified connector.
Parameters: connector - CoyoteConnector that owns this processor Parameters: id - Identifier of this CoyoteProcessor (unique per connector) |
copyBytes | protected static void copyBytes(byte[] b, int dest, int src, int len)(Code) | | Copy an array of bytes to a different position. Used during
normalization.
|
log | protected void log(String message)(Code) | | Log a message on the Logger associated with our Container (if any)
Parameters: message - Message to be logged |
log | protected void log(String message, Throwable throwable)(Code) | | Log a message on the Logger associated with our Container (if any)
Parameters: message - Message to be logged Parameters: throwable - Associated exception |
normalize | public static boolean normalize(MessageBytes uriMB)(Code) | | Normalize URI.
This method normalizes "\", "//", "/./" and "/../". This method will
return false when trying to go above the root, or if the URI contains
a null byte.
Parameters: uriMB - URI to be normalized |
parseSessionId | protected void parseSessionId(Request req, CoyoteRequest request)(Code) | | Parse session id in URL.
FIXME: Optimize this.
|
validate | protected static String validate(String path)(Code) | | Return a context-relative path, beginning with a "/", that represents
the canonical version of the specified path after ".." and "." elements
are resolved out. If the specified path attempts to go outside the
boundaries of the current context (i.e. too many ".." path elements
are present), return null instead.
This code is not optimized, and is only needed for Tomcat 4.0.x.
Parameters: path - Path to be validated |
|
|