@Override public void failure(final Throwable error) { try { if (!response.isCommitted()) { try { if (configSetStatusOverSendError) { response.reset(); //noinspection deprecation response.setStatus(INTERNAL_SERVER_ERROR, "Request failed."); } else { response.sendError(INTERNAL_SERVER_ERROR, "Request failed."); } } catch (final IllegalStateException ex) { // a race condition externally committing the response can still occur... LOGGER.log(Level.FINER, "Unable to reset failed response.", ex); } catch (final IOException ex) { throw new ContainerException(LocalizationMessages.EXCEPTION_SENDING_ERROR_RESPONSE(INTERNAL_SERVER_ERROR, "Request failed."), ex); } } } finally { LOGGER.log(Level.FINEST, "failure(...) called"); commit(); rethrow(error); } }
public void resetBuffer() { if (isCommitted()) throw new IllegalStateException("Committed"); _connection.getGenerator().resetBuffer(); }
public void resetBuffer() { if (isCommitted()) throw new IllegalStateException("Committed"); _connection.getGenerator().resetBuffer(); }
public void resetBuffer() { if (isCommitted()) throw new IllegalStateException("Committed"); _connection.getGenerator().resetBuffer(); }
@Override public void setBufferSize(int size) { if (isCommitted() || getContentCount() > 0) throw new IllegalStateException("cannot set buffer size on committed response"); if (size <= 0) size = __MIN_BUFFER_SIZE; _out.setBufferSize(size); }
public void resetBuffer() { if (isCommitted()) throw new IllegalStateException("Committed"); _connection.getGenerator().resetBuffer(); }
@Override public void setBufferSize(int size) { if (isCommitted() || getContentCount() > 0) throw new IllegalStateException("Committed or content written"); _out.setBufferSize(size); }
public void setBufferSize(int size) { if (isCommitted() || getContentCount()>0) throw new IllegalStateException("Committed or content written"); if (size <= 0) size = __MIN_BUFFER_SIZE; _connection.getGenerator().increaseContentBufferSize(size); }
public void setBufferSize(int size) { if (isCommitted() || getContentCount()>0) throw new IllegalStateException("Committed or content written"); if (size <= 0) size = __MIN_BUFFER_SIZE; _connection.getGenerator().increaseContentBufferSize(size); }
public void setBufferSize(int size) { if (isCommitted() || getContentCount()>0) throw new IllegalStateException("Committed or content written"); _connection.getGenerator().increaseContentBufferSize(size); }
public void setBufferSize(int size) { if (isCommitted() || getContentCount()>0) throw new IllegalStateException("Committed or content written"); if (size <= 0) size = __MIN_BUFFER_SIZE; _connection.getGenerator().increaseContentBufferSize(size); }
public void sendProcessing() throws IOException { if (_connection.isExpecting102Processing() && !isCommitted()) ((HttpGenerator)_connection.getGenerator()).send1xx(HttpStatus.PROCESSING_102); }
public void sendProcessing() throws IOException { if (_connection.isExpecting102Processing() && !isCommitted()) ((HttpGenerator)_connection.getGenerator()).send1xx(HttpStatus.PROCESSING_102); }
public void setLongContentLength(long len) { // Protect from setting after committed as default handling // of a servlet HEAD request ALWAYS sets _content length, even // if the getHandling committed the response! if (isCommitted() || isIncluding()) return; _contentLength = len; _fields.putLongField(HttpHeader.CONTENT_LENGTH.toString(), len); }
public void sendProcessing() throws IOException { if (_connection.isExpecting102Processing() && !isCommitted()) ((HttpGenerator)_connection.getGenerator()).send1xx(HttpStatus.PROCESSING_102); }
public void setLongContentLength(long len) { // Protect from setting after committed as default handling // of a servlet HEAD request ALWAYS sets _content length, even // if the getHandling committed the response! if (isCommitted() || isIncluding()) return; _contentLength = len; _fields.putLongField(HttpHeader.CONTENT_LENGTH.toString(), len); }
public void sendProcessing() throws IOException { if (_connection.isExpecting102Processing() && !isCommitted()) ((HttpGenerator)_connection.getGenerator()).send1xx(HttpStatus.PROCESSING_102); }
public void setLongContentLength(long len) { // Protect from setting after committed as default handling // of a servlet HEAD request ALWAYS sets _content length, even // if the getHandling committed the response! if (isCommitted() || _connection.isIncluding()) return; _connection._generator.setContentLength(len); _connection.getResponseFields().putLongField(HttpHeaders.CONTENT_LENGTH, len); }
public void setLongContentLength(long len) { // Protect from setting after committed as default handling // of a servlet HEAD request ALWAYS sets _content length, even // if the getHandling committed the response! if (isCommitted() || _connection.isIncluding()) return; _connection._generator.setContentLength(len); _connection.getResponseFields().putLongField(HttpHeaders.CONTENT_LENGTH, len); }
public void setLongContentLength(long len) { // Protect from setting after committed as default handling // of a servlet HEAD request ALWAYS sets _content length, even // if the getHandling committed the response! if (isCommitted() || _connection.isIncluding()) return; _connection._generator.setContentLength(len); _connection.getResponseFields().putLongField(HttpHeaders.CONTENT_LENGTH, len); }