Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: runtime/bin/http.dart

Issue 10315002: Improve the handling of the connection header (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from ajohnsen@ Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * HTTP status codes. 6 * HTTP status codes.
7 */ 7 */
8 interface HttpStatus { 8 interface HttpStatus {
9 static final int CONTINUE = 100; 9 static final int CONTINUE = 100;
10 static final int SWITCHING_PROTOCOLS = 101; 10 static final int SWITCHING_PROTOCOLS = 101;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 * Http request delivered to the HTTP server callback. 299 * Http request delivered to the HTTP server callback.
300 */ 300 */
301 interface HttpRequest default _HttpRequest { 301 interface HttpRequest default _HttpRequest {
302 /** 302 /**
303 * Returns the content length of the request body. If the size of 303 * Returns the content length of the request body. If the size of
304 * the request body is not known in advance this -1. 304 * the request body is not known in advance this -1.
305 */ 305 */
306 int get contentLength(); 306 int get contentLength();
307 307
308 /** 308 /**
309 * Returns the persistent connection state signaled by the client.
310 */
311 bool get persistentConnection();
312
313 /**
309 * Returns the method for the request. 314 * Returns the method for the request.
310 */ 315 */
311 String get method(); 316 String get method();
312 317
313 /** 318 /**
314 * Returns the URI for the request. 319 * Returns the URI for the request.
315 */ 320 */
316 String get uri(); 321 String get uri();
317 322
318 /** 323 /**
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 */ 366 */
362 int statusCode; 367 int statusCode;
363 368
364 /** 369 /**
365 * Gets and sets the reason phrase. If no reason phrase is explicitly 370 * Gets and sets the reason phrase. If no reason phrase is explicitly
366 * set a default reason phrase is provided. 371 * set a default reason phrase is provided.
367 */ 372 */
368 String reasonPhrase; 373 String reasonPhrase;
369 374
370 /** 375 /**
376 * Gets and sets the persistent connection state. The initial value
377 * of this property is the persistent connection state from the
378 * request.
379 */
380 bool persistentConnection;
381
382 /**
371 * Returns the response headers. 383 * Returns the response headers.
372 */ 384 */
373 HttpHeaders get headers(); 385 HttpHeaders get headers();
374 386
375 /** 387 /**
376 * Returns the output stream for the response. This is used to write 388 * Returns the output stream for the response. This is used to write
377 * the response data. When all response data has been written close 389 * the response data. When all response data has been written close
378 * the stream to indicate the end of the response. 390 * the stream to indicate the end of the response.
379 * 391 *
380 * When this is accessed for the first time the response header is 392 * When this is accessed for the first time the response header is
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 */ 560 */
549 InputStream get inputStream(); 561 InputStream get inputStream();
550 } 562 }
551 563
552 564
553 class HttpException implements Exception { 565 class HttpException implements Exception {
554 const HttpException([String this.message = ""]); 566 const HttpException([String this.message = ""]);
555 String toString() => "HttpException: $message"; 567 String toString() => "HttpException: $message";
556 final String message; 568 final String message;
557 } 569 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | tests/standalone/io/http_connection_header_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698