Wrapper object for the Coyote request.
| 127 | * Wrapper object for the Coyote request. |
| 128 | */ |
| 129 | public class Request implements HttpServletRequest { |
| 130 | |
| 131 | private static final String HTTP_UPGRADE_HEADER_NAME = "upgrade"; |
| 132 | |
| 133 | private static final Log log = LogFactory.getLog(Request.class); |
| 134 | |
| 135 | /** |
| 136 | * Create a new Request object associated with the given Connector. |
| 137 | * |
| 138 | * @param connector The Connector with which this Request object will always be associated. In normal usage this |
| 139 | * must be non-null. In some test scenarios, it may be possible to use a null Connector |
| 140 | * without triggering an NPE. |
| 141 | * @param coyoteRequest The Coyote request with which this Request object will always be associated. In normal usage |
| 142 | * this must be non-null. In some test scenarios, it may be possible to use a null request |
| 143 | * without triggering an NPE. |
| 144 | */ |
| 145 | public Request(Connector connector, org.apache.coyote.Request coyoteRequest) { |
| 146 | this.connector = connector; |
| 147 | if (connector != null) { |
| 148 | maxParameterCount = connector.getMaxParameterCount(); |
| 149 | maxPartCount = connector.getMaxPartCount(); |
| 150 | maxPartHeaderSize = connector.getMaxPartHeaderSize(); |
| 151 | } |
| 152 | this.coyoteRequest = coyoteRequest; |
| 153 | inputBuffer = new InputBuffer(coyoteRequest); |
| 154 | } |
| 155 | |
| 156 | |
| 157 | // ------------------------------------------------------------- Properties |
| 158 | |
| 159 | /** |
| 160 | * Coyote request. |
| 161 | */ |
| 162 | protected final org.apache.coyote.Request coyoteRequest; |
| 163 | |
| 164 | /** |
| 165 | * Get the Coyote request. |
| 166 | * |
| 167 | * @return the Coyote request object |
| 168 | */ |
| 169 | public org.apache.coyote.Request getCoyoteRequest() { |
| 170 | return this.coyoteRequest; |
| 171 | } |
| 172 | |
| 173 | |
| 174 | // ----------------------------------------------------- Variables |
| 175 | |
| 176 | /** |
| 177 | * The string manager for this package. |
| 178 | */ |
| 179 | protected static final StringManager sm = StringManager.getManager(Request.class); |
| 180 | |
| 181 | |
| 182 | /** |
| 183 | * The set of cookies associated with this Request. |
| 184 | */ |
| 185 | protected Cookie[] cookies = null; |
| 186 |
nothing calls this directly
no test coverage detected