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

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

Issue 10850034: Rename BadNumberFormatException -> FormatException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « lib/unittest/unittest.dart ('k') | runtime/bin/http_utils.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) 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 class _HttpHeaders implements HttpHeaders { 5 class _HttpHeaders implements HttpHeaders {
6 _HttpHeaders() : _headers = new Map<String, List<String>>(); 6 _HttpHeaders() : _headers = new Map<String, List<String>>();
7 7
8 List<String> operator[](String name) { 8 List<String> operator[](String name) {
9 name = name.toLowerCase(); 9 name = name.toLowerCase();
10 return _headers[name]; 10 return _headers[name];
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (pos > 0) { 160 if (pos > 0) {
161 _host = value.substring(0, pos); 161 _host = value.substring(0, pos);
162 } else { 162 } else {
163 _host = null; 163 _host = null;
164 } 164 }
165 if (pos + 1 == value.length) { 165 if (pos + 1 == value.length) {
166 _port = HttpClient.DEFAULT_HTTP_PORT; 166 _port = HttpClient.DEFAULT_HTTP_PORT;
167 } else { 167 } else {
168 try { 168 try {
169 _port = Math.parseInt(value.substring(pos + 1)); 169 _port = Math.parseInt(value.substring(pos + 1));
170 } catch (BadNumberFormatException e) { 170 } catch (FormatException e) {
171 _port = null; 171 _port = null;
172 } 172 }
173 } 173 }
174 _set("host", value); 174 _set("host", value);
175 } 175 }
176 } else if (name.toLowerCase() == "content-type") { 176 } else if (name.toLowerCase() == "content-type") {
177 _set("content-type", value); 177 _set("content-type", value);
178 } else { 178 } else {
179 name = name.toLowerCase(); 179 name = name.toLowerCase();
180 List<String> values = _headers[name]; 180 List<String> values = _headers[name];
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 2131
2132 2132
2133 class _RedirectInfo implements RedirectInfo { 2133 class _RedirectInfo implements RedirectInfo {
2134 const _RedirectInfo(int this.statusCode, 2134 const _RedirectInfo(int this.statusCode,
2135 String this.method, 2135 String this.method,
2136 Uri this.location); 2136 Uri this.location);
2137 final int statusCode; 2137 final int statusCode;
2138 final String method; 2138 final String method;
2139 final Uri location; 2139 final Uri location;
2140 } 2140 }
OLDNEW
« no previous file with comments | « lib/unittest/unittest.dart ('k') | runtime/bin/http_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698