@Override public void badMessage(int status, String reason) { _generator.setPersistent(false); super.badMessage(status,reason); }
@Override public void badMessage(int status, String reason) { _generator.setPersistent(false); super.badMessage(status,reason); }
@Override public void badMessage(int status, String reason) { _generator.setPersistent(false); super.badMessage(status,reason); }
@Override public void abort() { super.abort(); _generator.setPersistent(false); }
@Override protected void handleException(Throwable x) { _generator.setPersistent(false); super.handleException(x); }
@Override protected void handleException(Throwable x) { _generator.setPersistent(false); super.handleException(x); }
@Override protected void handleException(Throwable x) { _generator.setPersistent(false); super.handleException(x); }
@Override public void abort(Throwable failure) { super.abort(failure); _httpConnection.getGenerator().setPersistent(false); }
@Override protected void handleException(Throwable x) { _httpConnection.getGenerator().setPersistent(false); super.handleException(x); }
@Override public void abort(Throwable failure) { super.abort(failure); _httpConnection.getGenerator().setPersistent(false); }
@Override public void send(ResponseInfo info, ByteBuffer content, boolean lastContent, Callback callback) { // If we are still expecting a 100 continues when we commit if (info!=null && _channel.isExpecting100Continue()) // then we can't be persistent _generator.setPersistent(false); if(_sendCallback.reset(info,content,lastContent,callback)) _sendCallback.iterate(); }
@Override protected void handleException(Throwable x) { _httpConnection.getGenerator().setPersistent(false); super.handleException(x); }
private void honourMaxKeepAliveRequests() { if (jDiscContext.serverConfig.maxKeepAliveRequests() > 0) { HttpConnection connection = getConnection(jettyRequest); if (connection.getMessagesIn() >= jDiscContext.serverConfig.maxKeepAliveRequests()) { connection.getGenerator().setPersistent(false); } } }
@Override public void earlyEOF() { _httpConnection.getGenerator().setPersistent(false); // If we have no request yet, just close if (_metadata.getMethod() == null) _httpConnection.close(); else if (onEarlyEOF() || _delayedForContent) { _delayedForContent = false; handle(); } }
@Override public void send(MetaData.Response info, boolean head, ByteBuffer content, boolean lastContent, Callback callback) { if (info == null) { if (!lastContent && BufferUtil.isEmpty(content)) { callback.succeeded(); return; } } else { // If we are still expecting a 100 continues when we commit if (_channel.isExpecting100Continue()) // then we can't be persistent _generator.setPersistent(false); } if(_sendCallback.reset(info,head,content,lastContent,callback)) _sendCallback.iterate(); }
@Override public void send(MetaData.Response info, boolean head, ByteBuffer content, boolean lastContent, Callback callback) { if (info == null) { if (!lastContent && BufferUtil.isEmpty(content)) { callback.succeeded(); return; } } else { // If we are still expecting a 100 continues when we commit if (_channel.isExpecting100Continue()) // then we can't be persistent _generator.setPersistent(false); } if(_sendCallback.reset(info,head,content,lastContent,callback)) { _sendCallback.iterate(); } }
@Override public void badMessage(int status, String reason) { _httpConnection.getGenerator().setPersistent(false); try { // Need to call onRequest, so RequestLog can reports as much as possible onRequest(_metadata); getRequest().getHttpInput().earlyEOF(); } catch (Exception e) { LOG.ignore(e); } onBadMessage(status,reason); }
@Override public void badMessage(BadMessageException failure) { _httpConnection.getGenerator().setPersistent(false); try { // Need to call onRequest, so RequestLog can reports as much as possible onRequest(_metadata); getRequest().getHttpInput().earlyEOF(); } catch (Exception e) { LOG.ignore(e); } onBadMessage(failure); }
private boolean reset(MetaData.Response info, boolean head, ByteBuffer content, boolean last, Callback callback) { if (reset()) { _info = info; _head = head; _content = content; _lastContent = last; _callback = callback; _header = null; _shutdownOut = false; if (getConnector().isShutdown()) _generator.setPersistent(false); return true; } if (isClosed()) callback.failed(new EofException()); else callback.failed(new WritePendingException()); return false; }
_generator.setPersistent(false);