comparison src/org/eclipse/jetty/http/AbstractGenerator.java @ 1034:563458c4dc93

remove HttpGenerator.reset()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 03 Nov 2016 21:02:59 -0600
parents 921c25a05eaa
children 898774c2cd87
comparison
equal deleted inserted replaced
1033:4ada7a8c128a 1034:563458c4dc93
106 public final boolean isOpen() 106 public final boolean isOpen()
107 { 107 {
108 return _endp.isOpen(); 108 return _endp.isOpen();
109 } 109 }
110 110
111 public void reset()
112 {
113 _state = STATE_HEADER;
114 _status = 0;
115 _version = HttpVersions.HTTP_1_1_ORDINAL;
116 _reason = null;
117 _last = false;
118 _head = false;
119 _noContent=false;
120 _persistent = null;
121 _contentWritten = 0;
122 _contentLength = HttpTokens.UNKNOWN_CONTENT;
123
124 _content = null;
125 _method = null;
126 }
127
128 public final void returnBuffers() 111 public final void returnBuffers()
129 { 112 {
130 if (_buffer!=null && _buffer.length()==0) 113 if (_buffer!=null && _buffer.length()==0)
131 { 114 {
132 _buffer=null; 115 _buffer=null;
142 { 125 {
143 if(_state>=STATE_FLUSHING) 126 if(_state>=STATE_FLUSHING)
144 throw new IllegalStateException("Flushed"); 127 throw new IllegalStateException("Flushed");
145 128
146 _last = false; 129 _last = false;
147 _persistent=null; 130 _persistent = null;
148 _contentWritten = 0; 131 _contentWritten = 0;
149 _contentLength = HttpTokens.UNKNOWN_CONTENT; 132 _contentLength = HttpTokens.UNKNOWN_CONTENT;
150 _content=null; 133 _content=null;
151 if (_buffer!=null) 134 if (_buffer!=null)
152 _buffer.clear(); 135 _buffer.clear();