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

Unified Diff: pkg/shelf/lib/shelf_io.dart

Issue 227563010: pkg/shelf: case-insensitive headers, cleaner Request ctor, a lot more tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixing dependent code, changelog Created 6 years, 8 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 | « pkg/shelf/example/example_server.dart ('k') | pkg/shelf/lib/src/handlers/logger.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/shelf/lib/shelf_io.dart
diff --git a/pkg/shelf/lib/shelf_io.dart b/pkg/shelf/lib/shelf_io.dart
index 98a3596931b05595576e387e824519fe857ccaa0..b8667190142fda1929e1dd76afc2a92abedb72e9 100644
--- a/pkg/shelf/lib/shelf_io.dart
+++ b/pkg/shelf/lib/shelf_io.dart
@@ -65,7 +65,6 @@ Future handleRequest(HttpRequest request, Handler handler) {
/// Creates a new [Request] from the provided [HttpRequest].
Request _fromHttpRequest(HttpRequest request) {
- //TODO(kevmoo): make headers case-insensitive
var headers = {};
request.headers.forEach((k, v) {
// Multiple header values are joined with commas.
@@ -73,9 +72,9 @@ Request _fromHttpRequest(HttpRequest request) {
headers[k] = v.join(',');
});
- return new Request(request.uri.path, request.uri.query, request.method,
- '', request.protocolVersion, request.requestedUri,
- headers, body: request);
+ return new Request(request.method, request.requestedUri,
+ protocolVersion: request.protocolVersion, headers: headers,
+ body: request);
}
Future _writeResponse(Response response, HttpResponse httpResponse) {
« no previous file with comments | « pkg/shelf/example/example_server.dart ('k') | pkg/shelf/lib/src/handlers/logger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698