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

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

Issue 12504006: Make IOSink implement StringSink (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed second round of review comments Created 7 years, 9 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.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_headers.dart
diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart
index b2b522b3b3e900f84131bb909c9efb8d2feb9c02..31ed38afcca226fa46f16fa04c0ff494e0a204ad 100644
--- a/sdk/lib/io/http_headers.dart
+++ b/sdk/lib/io/http_headers.dart
@@ -350,7 +350,7 @@ class _HttpHeaders implements HttpHeaders {
var bufferPos = 0;
void writeBuffer() {
- sink.add(buffer.getRange(0, bufferPos));
+ sink.writeBytes(buffer.getRange(0, bufferPos));
bufferPos = 0;
}
@@ -621,6 +621,9 @@ class _HeaderValue implements HeaderValue {
class _ContentType extends _HeaderValue implements ContentType {
+ String _primaryType = "";
+ String _subType = "";
+
_ContentType(String primaryType,
String subType,
String charset,
@@ -639,7 +642,7 @@ class _ContentType extends _HeaderValue implements ContentType {
}
}
- _ContentType.fromString(String value) : super.fromString(value) {
+ _ContentType.fromString(String value) : super.fromString(value) {
int index = _value.indexOf("/");
if (index == -1 || index == (_value.length - 1)) {
_primaryType = _value.trim().toLowerCase();
@@ -655,9 +658,6 @@ class _ContentType extends _HeaderValue implements ContentType {
String get subType => _subType;
String get charset => parameters["charset"];
-
- String _primaryType = "";
- String _subType = "";
}
« no previous file with comments | « sdk/lib/io/http.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698