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

Side by Side Diff: pkg/http/test/safe_http_server.dart

Issue 16019002: Merge the dart:uri library into dart:core and update the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final cleanup Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/http/test/mock_client_test.dart ('k') | pkg/http/test/utils.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library safe_http_server; 5 library safe_http_server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:uri';
10 9
11 // TODO(nweiz): remove this when issue 9140 is fixed. 10 // TODO(nweiz): remove this when issue 9140 is fixed.
12 /// A wrapper around [HttpServer] that swallows errors caused by requests 11 /// A wrapper around [HttpServer] that swallows errors caused by requests
13 /// behaving badly. This provides the following guarantees: 12 /// behaving badly. This provides the following guarantees:
14 /// 13 ///
15 /// * The [SafeHttpServer.listen] onError callback will only emit server-wide 14 /// * The [SafeHttpServer.listen] onError callback will only emit server-wide
16 /// errors. It will not emit errors for requests that were unparseable or 15 /// errors. It will not emit errors for requests that were unparseable or
17 /// where the connection was closed too soon. 16 /// where the connection was closed too soon.
18 /// * [HttpResponse.done] will emit no errors. 17 /// * [HttpResponse.done] will emit no errors.
19 /// 18 ///
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 Future<HttpResponse> addStream(Stream<List<int>> stream) => 133 Future<HttpResponse> addStream(Stream<List<int>> stream) =>
135 _inner.addStream(stream); 134 _inner.addStream(stream);
136 Future close() => _inner.close(); 135 Future close() => _inner.close();
137 void write(Object obj) => _inner.write(obj); 136 void write(Object obj) => _inner.write(obj);
138 void writeAll(Iterable objects, [String separator = ""]) => 137 void writeAll(Iterable objects, [String separator = ""]) =>
139 _inner.writeAll(objects, separator); 138 _inner.writeAll(objects, separator);
140 void writeCharCode(int charCode) => _inner.writeCharCode(charCode); 139 void writeCharCode(int charCode) => _inner.writeCharCode(charCode);
141 void writeln([Object obj = ""]) => _inner.writeln(obj); 140 void writeln([Object obj = ""]) => _inner.writeln(obj);
142 void addError(error) => _inner.addError(error); 141 void addError(error) => _inner.addError(error);
143 } 142 }
OLDNEW
« no previous file with comments | « pkg/http/test/mock_client_test.dart ('k') | pkg/http/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698