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

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

Issue 80883002: Avoid unneeded toLowerCase and add fast version of _isTokenChar, in HTTP parser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More cleanup. Created 7 years, 1 month 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_headers.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 98ee9b95b85c007d7a65864b967d1ab0d553d56a..814ebd574d9cca3d88b633ffabc3abc580e82645 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -724,7 +724,7 @@ class _HttpResponse extends _HttpOutboundMessage<HttpResponse>
_HttpOutgoing outgoing,
String serverHeader)
: super(uri, protocolVersion, outgoing) {
- if (serverHeader != null) headers.set('Server', serverHeader);
+ if (serverHeader != null) headers._add('server', serverHeader);
}
List<Cookie> get cookies {
@@ -747,7 +747,7 @@ class _HttpResponse extends _HttpOutboundMessage<HttpResponse>
Future redirect(Uri location, {int status: HttpStatus.MOVED_TEMPORARILY}) {
if (_headersWritten) throw new StateError("Header already sent");
statusCode = status;
- headers.set("Location", location.toString());
+ headers.set("location", location.toString());
return close();
}
@@ -1303,9 +1303,9 @@ class _HttpClientConnection {
this);
request.headers.host = uri.host;
request.headers.port = port;
- request.headers.set(HttpHeaders.ACCEPT_ENCODING, "gzip");
+ request.headers._add(HttpHeaders.ACCEPT_ENCODING, "gzip");
if (_httpClient.userAgent != null) {
- request.headers.set('User-Agent', _httpClient.userAgent);
+ request.headers._add('user-agent', _httpClient.userAgent);
}
if (proxy.isAuthenticated) {
// If the proxy configuration contains user information use that
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698