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; }
/** * Return the HTTP status code associated with this Response. */ public int getStatus() { return coyoteResponse.getStatus(); }
/** * Return the HTTP status code associated with this Response. */ public int getStatus() { return coyoteResponse.getStatus(); }
/** * Return the HTTP status code associated with this Response. */ @Override public int getStatus() { return coyoteResponse.getStatus(); }
/** * Return the HTTP status code associated with this Response. */ public int getStatus() { return coyoteResponse.getStatus(); }
/** * Return the HTTP status code associated with this Response. */ @Override public int getStatus() { return coyoteResponse.getStatus(); }
/** * Return the HTTP status code associated with this Response. */ @Override public int getStatus() { return coyoteResponse.getStatus(); }
/** * Return the HTTP status code associated with this Response. */ @Override public int getStatus() { return coyoteResponse.getStatus(); }
/* */ public int getStatus() /* */ { /* 904 */ return this.coyoteResponse.getStatus(); /* */ } /* */
@Override public int getStatus() { return coyoteResponse.getStatus(); }
@Override public int getStatus() { return coyoteResponse.getStatus(); }
@Override public int getStatus() { return getCoyoteResponse().getStatus(); }
private void checkExpectationAndResponseStatus() { if (request.hasExpectation() && (response.getStatus() < 200 || response.getStatus() > 299)) { // Client sent Expect: 100-continue but received a // non-2xx final response. Disable keep-alive (if enabled) // to ensure that the connection is closed. Some clients may // still send the body, some may send the next request. // No way to differentiate, so close the connection to // force the client to send the next request. inputBuffer.setSwallowInput(false); keepAlive = false; } }
@Override public int getStatus() { return getCoyoteResponse().getStatus(); }
/** Called by the processor before recycling the request. It'll collect * statistic information. */ void updateCounters() { bytesReceived+=req.getBytesRead(); bytesSent+=req.getResponse().getContentWritten(); requestCount++; if( req.getResponse().getStatus() >=400 ) errorCount++; long t0=req.getStartTime(); long t1=System.currentTimeMillis(); long time=t1-t0; this.lastRequestProcessingTime = time; processingTime+=time; if( maxTime < time ) { maxTime=time; maxRequestUri=req.requestURI().toString(); } }
/** Called by the processor before recycling the request. It'll collect * statistic information. */ void updateCounters() { bytesReceived+=req.getBytesRead(); bytesSent+=req.getResponse().getContentWritten(); requestCount++; if( req.getResponse().getStatus() >=400 ) errorCount++; long t0=req.getStartTime(); long t1=System.currentTimeMillis(); long time=t1-t0; this.lastRequestProcessingTime = time; processingTime+=time; if( maxTime < time ) { maxTime=time; maxRequestUri=req.requestURI().toString(); } }
/** Called by the processor before recycling the request. It'll collect * statistic information. */ void updateCounters() { bytesReceived+=req.getBytesRead(); bytesSent+=req.getResponse().getContentWritten(); requestCount++; if( req.getResponse().getStatus() >=400 ) errorCount++; long t0=req.getStartTime(); long t1=System.currentTimeMillis(); long time=t1-t0; this.lastRequestProcessingTime = time; processingTime+=time; if( maxTime < time ) { maxTime=time; maxRequestUri=req.requestURI().toString(); } }
/** Called by the processor before recycling the request. It'll collect * statistic information. */ void updateCounters() { bytesReceived+=req.getBytesRead(); bytesSent+=req.getResponse().getBytesWritten(); requestCount++; if( req.getResponse().getStatus() >=400 ) errorCount++; long t0=req.getStartTime(); long t1=System.currentTimeMillis(); long time=t1-t0; this.lastRequestProcessingTime = time; processingTime+=time; if( maxTime < time ) { maxTime=time; maxRequestUri=req.requestURI().toString(); } }
/** Called by the processor before recycling the request. It'll collect * statistic information. */ void updateCounters() { bytesReceived+=req.getBytesRead(); bytesSent+=req.getResponse().getContentWritten(); requestCount++; if( req.getResponse().getStatus() >=400 ) errorCount++; long t0=req.getStartTime(); long t1=System.currentTimeMillis(); long time=t1-t0; this.lastRequestProcessingTime = time; processingTime+=time; if( maxTime < time ) { maxTime=time; maxRequestUri=req.requestURI().toString(); } }
/** Called by the processor before recycling the request. It'll collect * statistic information. */ void updateCounters() { bytesReceived+=req.getBytesRead(); bytesSent+=req.getResponse().getBytesWritten(); requestCount++; if( req.getResponse().getStatus() >=400 ) errorCount++; long t0=req.getStartTime(); long t1=System.currentTimeMillis(); long time=t1-t0; this.lastRequestProcessingTime = time; processingTime+=time; if( maxTime < time ) { maxTime=time; maxRequestUri=req.requestURI().toString(); } }