本文整理了Java中org.apache.coyote.Response.getRequest
方法的一些代码示例,展示了Response.getRequest
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getRequest
方法的具体详情如下:
包路径:org.apache.coyote.Response
类名称:Response
方法名:getRequest
暂无
代码示例来源:origin: line/armeria
private static HttpHeaders convertResponse(Response coyoteRes) {
final HttpHeaders headers = HttpHeaders.of(HttpStatus.valueOf(coyoteRes.getStatus()));
final String contentType = coyoteRes.getContentType();
if (contentType != null && !contentType.isEmpty()) {
headers.set(HttpHeaderNames.CONTENT_TYPE, contentType);
}
final long contentLength = coyoteRes.getBytesWritten(true); // 'true' will trigger flush.
final String method = coyoteRes.getRequest().method().toString();
if (!"HEAD".equals(method)) {
headers.setLong(HttpHeaderNames.CONTENT_LENGTH, contentLength);
}
final MimeHeaders cHeaders = coyoteRes.getMimeHeaders();
final int numHeaders = cHeaders.size();
for (int i = 0; i < numHeaders; i++) {
final AsciiString name = toHeaderName(cHeaders.getName(i));
if (name == null) {
continue;
}
final String value = toHeaderValue(cHeaders.getValue(i));
if (value == null) {
continue;
}
headers.add(name.toLowerCase(), value);
}
return headers;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
&& !coyoteResponse.getRequest().method().equals("HEAD")) {
Request req = (Request) coyoteResponse.getRequest().getNote(CoyoteAdapter.ADAPTER_NOTES);
req.inputBuffer.close();
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
&& !coyoteResponse.getRequest().method().equals("HEAD")) {
Request req = (Request) coyoteResponse.getRequest().getNote(CoyoteAdapter.ADAPTER_NOTES);
req.inputBuffer.close();
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
Request req = (Request) coyoteResponse.getRequest().getNote(
CoyoteAdapter.ADAPTER_NOTES);
req.inputBuffer.close();
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
Request req = (Request) coyoteResponse.getRequest().getNote(
CoyoteAdapter.ADAPTER_NOTES);
req.inputBuffer.close();
代码示例来源:origin: codefollower/Tomcat-Research
Request req = (Request) coyoteResponse.getRequest().getNote(
CoyoteAdapter.ADAPTER_NOTES);
req.inputBuffer.close();
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
if( getStatus()== JK_STATUS_CLOSED || getStatus() == JK_STATUS_ERROR) {
if( log.isDebugEnabled() ) log.debug("Double CLOSE - forward ? " + res.getRequest().requestURI() );
return;
logTime(res.getRequest(), res);
} else if( actionCode==ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) {
Request req=(Request)param;
内容来源于网络,如有侵权,请联系作者删除!