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

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

Issue 14113006: Fix HttpBodyHandler to handle missing mimeType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix comment. Created 7 years, 8 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
« no previous file with comments | « sdk/lib/io/http_body_impl.dart ('k') | tests/standalone/io/http_body_test.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 class _HttpHeaders implements HttpHeaders { 7 class _HttpHeaders implements HttpHeaders {
8 _HttpHeaders(String this.protocolVersion) 8 _HttpHeaders(String this.protocolVersion)
9 : _headers = new Map<String, List<String>>(); 9 : _headers = new Map<String, List<String>>();
10 10
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 int index = _value.indexOf("/"); 625 int index = _value.indexOf("/");
626 if (index == -1 || index == (_value.length - 1)) { 626 if (index == -1 || index == (_value.length - 1)) {
627 _primaryType = _value.trim().toLowerCase(); 627 _primaryType = _value.trim().toLowerCase();
628 _subType = ""; 628 _subType = "";
629 } else { 629 } else {
630 _primaryType = _value.substring(0, index).trim().toLowerCase(); 630 _primaryType = _value.substring(0, index).trim().toLowerCase();
631 _subType = _value.substring(index + 1).trim().toLowerCase(); 631 _subType = _value.substring(index + 1).trim().toLowerCase();
632 } 632 }
633 } 633 }
634 634
635 String get mimeType => '$primaryType/$subType';
636
635 String get primaryType => _primaryType; 637 String get primaryType => _primaryType;
636 638
637 String get subType => _subType; 639 String get subType => _subType;
638 640
639 String get charset => parameters["charset"]; 641 String get charset => parameters["charset"];
640 } 642 }
641 643
642 644
643 class _Cookie implements Cookie { 645 class _Cookie implements Cookie {
644 _Cookie([String this.name, String this.value]); 646 _Cookie([String this.name, String this.value]);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 764
763 String name; 765 String name;
764 String value; 766 String value;
765 DateTime expires; 767 DateTime expires;
766 int maxAge; 768 int maxAge;
767 String domain; 769 String domain;
768 String path; 770 String path;
769 bool httpOnly = false; 771 bool httpOnly = false;
770 bool secure = false; 772 bool secure = false;
771 } 773 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_body_impl.dart ('k') | tests/standalone/io/http_body_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698