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

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

Issue 694293002: Only lower-case ContentType's values if the name is 'charset'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | sdk/lib/io/http_headers.dart » ('j') | no next file with comments »
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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 * 743 *
744 * application/octet-stream 744 * application/octet-stream
745 */ 745 */
746 static final BINARY = new ContentType("application", "octet-stream"); 746 static final BINARY = new ContentType("application", "octet-stream");
747 747
748 /** 748 /**
749 * Creates a new content type object setting the primary type and 749 * Creates a new content type object setting the primary type and
750 * sub type. The charset and additional parameters can also be set 750 * sub type. The charset and additional parameters can also be set
751 * using [charset] and [parameters]. If charset is passed and 751 * using [charset] and [parameters]. If charset is passed and
752 * [parameters] contains charset as well the passed [charset] will 752 * [parameters] contains charset as well the passed [charset] will
753 * override the value in parameters. Keys and values passed in 753 * override the value in parameters. Keys passed in parameters will be
754 * parameters will be converted to lower case. 754 * converted to lower case. The `charset` entry, whether passed as `charset`
755 * or in `parameters`, will have its value converted to lower-case.
755 */ 756 */
756 factory ContentType(String primaryType, 757 factory ContentType(String primaryType,
757 String subType, 758 String subType,
758 {String charset, Map<String, String> parameters}) { 759 {String charset, Map<String, String> parameters}) {
759 return new _ContentType(primaryType, subType, charset, parameters); 760 return new _ContentType(primaryType, subType, charset, parameters);
760 } 761 }
761 762
762 /** 763 /**
763 * Creates a new content type object from parsing a Content-Type 764 * Creates a new content type object from parsing a Content-Type
764 * header value. As primary type, sub type and parameter names and 765 * header value. As primary type, sub type and parameter names and
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 class RedirectException implements HttpException { 1990 class RedirectException implements HttpException {
1990 final String message; 1991 final String message;
1991 final List<RedirectInfo> redirects; 1992 final List<RedirectInfo> redirects;
1992 1993
1993 const RedirectException(this.message, this.redirects); 1994 const RedirectException(this.message, this.redirects);
1994 1995
1995 String toString() => "RedirectException: $message"; 1996 String toString() => "RedirectException: $message";
1996 1997
1997 Uri get uri => redirects.last.location; 1998 Uri get uri => redirects.last.location;
1998 } 1999 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/http_headers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698