comparison src/org/eclipse/jetty/http/HttpGenerator.java @ 990:83cc6e05a58f

remove special attribute handling
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 17 Oct 2016 05:50:47 -0600
parents 23ec25435b8c
children f126d30e04a4
comparison
equal deleted inserted replaced
989:900e5b8ccd19 990:83cc6e05a58f
211 int len=_buffer.put(_content); 211 int len=_buffer.put(_content);
212 _content.skip(len); 212 _content.skip(len);
213 if (_content.length() == 0) 213 if (_content.length() == 0)
214 _content = null; 214 _content = null;
215 } 215 }
216 }
217
218 /* ------------------------------------------------------------ */
219 /**
220 * send complete response.
221 *
222 * @param response
223 */
224 public void sendResponse(Buffer response) throws IOException
225 {
226 if (_noContent || _state!=STATE_HEADER || _content!=null && _content.length()>0 || _bufferChunked || _head )
227 throw new IllegalStateException();
228
229 _last = true;
230
231 _content = response;
232 _bypass = true;
233 _state = STATE_FLUSHING;
234
235 // TODO this is not exactly right, but should do.
236 _contentLength =_contentWritten = response.length();
237
238 } 216 }
239 217
240 /* ------------------------------------------------------------ */ 218 /* ------------------------------------------------------------ */
241 /** Prepare buffer for unchecked writes. 219 /** Prepare buffer for unchecked writes.
242 * Prepare the generator buffer to receive unchecked writes 220 * Prepare the generator buffer to receive unchecked writes