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

Unified Diff: sdk/lib/io/mime_multipart_parser.dart

Issue 12425004: Fix deprecation warnings in dart:io. Now completely warning free. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/http_utils.dart ('k') | sdk/lib/io/socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/mime_multipart_parser.dart
diff --git a/sdk/lib/io/mime_multipart_parser.dart b/sdk/lib/io/mime_multipart_parser.dart
index 51f6b7f6a0ae8df397b20c2b2f4eeacad4f413aa..0721e46c151a4ad0dae0d787aa27373ac20b82b4 100644
--- a/sdk/lib/io/mime_multipart_parser.dart
+++ b/sdk/lib/io/mime_multipart_parser.dart
@@ -163,7 +163,7 @@ class _MimeMultipartParser {
_state = _HEADER_ENDING;
} else {
// Start of new header field.
- _headerField.addCharCode(_toLowerCase(byte));
+ _headerField.writeCharCode(_toLowerCase(byte));
_state = _HEADER_FIELD;
}
break;
@@ -175,7 +175,7 @@ class _MimeMultipartParser {
if (!_isTokenChar(byte)) {
throw new MimeParserException("Invalid header field name");
}
- _headerField.addCharCode(_toLowerCase(byte));
+ _headerField.writeCharCode(_toLowerCase(byte));
}
break;
@@ -184,7 +184,7 @@ class _MimeMultipartParser {
_state = _HEADER_VALUE_FOLDING_OR_ENDING;
} else if (byte != _CharCode.SP && byte != _CharCode.HT) {
// Start of new header value.
- _headerValue.addCharCode(byte);
+ _headerValue.writeCharCode(byte);
_state = _HEADER_VALUE;
}
break;
@@ -193,7 +193,7 @@ class _MimeMultipartParser {
if (byte == _CharCode.CR) {
_state = _HEADER_VALUE_FOLDING_OR_ENDING;
} else {
- _headerValue.addCharCode(byte);
+ _headerValue.writeCharCode(byte);
}
break;
@@ -211,13 +211,13 @@ class _MimeMultipartParser {
if (headerReceived != null) {
headerReceived(headerField, headerValue);
}
- _headerField.clear();
- _headerValue.clear();
+ _headerField = new StringBuffer();
+ _headerValue = new StringBuffer();
if (byte == _CharCode.CR) {
_state = _HEADER_ENDING;
} else {
// Start of new header field.
- _headerField.addCharCode(_toLowerCase(byte));
+ _headerField.writeCharCode(_toLowerCase(byte));
_state = _HEADER_FIELD;
}
}
« no previous file with comments | « sdk/lib/io/http_utils.dart ('k') | sdk/lib/io/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698