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

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

Issue 460653002: Fix bug in caching of chunked transfer encoding in HTTP headers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/standalone/io/http_headers_test.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 f621fff07fa1fc8e4246393737fc110480e49b4d..ce19a531112ee5d5468b13601d879a3b78aa26df 100644
--- a/sdk/lib/io/http_headers.dart
+++ b/sdk/lib/io/http_headers.dart
@@ -60,6 +60,9 @@ class _HttpHeaders implements HttpHeaders {
_checkMutable();
name = _validateField(name);
_headers.remove(name);
+ if (name == HttpHeaders.TRANSFER_ENCODING) {
Anders Johnsen 2014/08/11 12:39:55 This should hit the _add switch below, right?
Søren Gjesse 2014/08/11 14:20:49 The problem is that the logic invoked by _add will
Anders Johnsen 2014/08/12 05:42:38 I see. We should probably rewrite this logic at so
Søren Gjesse 2014/08/12 06:38:33 That we can absolutely agree on :-)
+ _chunkedTransferEncoding = false;
+ }
_addAll(name, value);
}
@@ -75,6 +78,9 @@ class _HttpHeaders implements HttpHeaders {
}
if (values.length == 0) _headers.remove(name);
}
Anders Johnsen 2014/08/11 12:39:56 Ditto.
Søren Gjesse 2014/08/11 14:20:49 This code never calls the _add code.
Anders Johnsen 2014/08/12 05:42:38 Right!
+ if (name == HttpHeaders.TRANSFER_ENCODING && value == "chunked") {
+ _chunkedTransferEncoding = false;
+ }
}
void removeAll(String name) {
« no previous file with comments | « no previous file | tests/standalone/io/http_headers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698