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

Side by Side Diff: sdk/lib/io/http.dart

Issue 2993873002: [dart:io] Ignore server http upgrade request unless status code is right (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « no previous file | sdk/lib/io/http_parser.dart » ('j') | sdk/lib/io/http_parser.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * HTTP status codes. 8 * HTTP status codes.
9 */ 9 */
10 abstract class HttpStatus { 10 abstract class HttpStatus {
(...skipping 25 matching lines...) Expand all
36 static const int REQUEST_TIMEOUT = 408; 36 static const int REQUEST_TIMEOUT = 408;
37 static const int CONFLICT = 409; 37 static const int CONFLICT = 409;
38 static const int GONE = 410; 38 static const int GONE = 410;
39 static const int LENGTH_REQUIRED = 411; 39 static const int LENGTH_REQUIRED = 411;
40 static const int PRECONDITION_FAILED = 412; 40 static const int PRECONDITION_FAILED = 412;
41 static const int REQUEST_ENTITY_TOO_LARGE = 413; 41 static const int REQUEST_ENTITY_TOO_LARGE = 413;
42 static const int REQUEST_URI_TOO_LONG = 414; 42 static const int REQUEST_URI_TOO_LONG = 414;
43 static const int UNSUPPORTED_MEDIA_TYPE = 415; 43 static const int UNSUPPORTED_MEDIA_TYPE = 415;
44 static const int REQUESTED_RANGE_NOT_SATISFIABLE = 416; 44 static const int REQUESTED_RANGE_NOT_SATISFIABLE = 416;
45 static const int EXPECTATION_FAILED = 417; 45 static const int EXPECTATION_FAILED = 417;
46 static const int UPGRADE_REQUIRED = 426;
46 static const int INTERNAL_SERVER_ERROR = 500; 47 static const int INTERNAL_SERVER_ERROR = 500;
47 static const int NOT_IMPLEMENTED = 501; 48 static const int NOT_IMPLEMENTED = 501;
48 static const int BAD_GATEWAY = 502; 49 static const int BAD_GATEWAY = 502;
49 static const int SERVICE_UNAVAILABLE = 503; 50 static const int SERVICE_UNAVAILABLE = 503;
50 static const int GATEWAY_TIMEOUT = 504; 51 static const int GATEWAY_TIMEOUT = 504;
51 static const int HTTP_VERSION_NOT_SUPPORTED = 505; 52 static const int HTTP_VERSION_NOT_SUPPORTED = 505;
52 // Client generated status code. 53 // Client generated status code.
53 static const int NETWORK_CONNECT_TIMEOUT_ERROR = 599; 54 static const int NETWORK_CONNECT_TIMEOUT_ERROR = 599;
54 } 55 }
55 56
(...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 class RedirectException implements HttpException { 1996 class RedirectException implements HttpException {
1996 final String message; 1997 final String message;
1997 final List<RedirectInfo> redirects; 1998 final List<RedirectInfo> redirects;
1998 1999
1999 const RedirectException(this.message, this.redirects); 2000 const RedirectException(this.message, this.redirects);
2000 2001
2001 String toString() => "RedirectException: $message"; 2002 String toString() => "RedirectException: $message";
2002 2003
2003 Uri get uri => redirects.last.location; 2004 Uri get uri => redirects.last.location;
2004 } 2005 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/http_parser.dart » ('j') | sdk/lib/io/http_parser.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698