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

Unified Diff: pkg/http/test/safe_http_server.dart

Issue 133993009: pkg/http: fixed analyzer warnings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 6 years, 11 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/http/lib/src/utils.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/safe_http_server.dart
diff --git a/pkg/http/test/safe_http_server.dart b/pkg/http/test/safe_http_server.dart
index 4ebcaa2df6d1a87ea21189261ec9f1d0c668f10c..8ce9ae436892404801349fd7ecdb39a9558947c6 100644
--- a/pkg/http/test/safe_http_server.dart
+++ b/pkg/http/test/safe_http_server.dart
@@ -5,6 +5,7 @@
library safe_http_server;
import 'dart:async';
+import 'dart:convert';
import 'dart:io';
// TODO(nweiz): remove this when issue 9140 is fixed.
@@ -19,6 +20,8 @@ import 'dart:io';
/// The [HttpRequest] data stream can still emit errors.
class SafeHttpServer extends StreamView<HttpRequest> implements HttpServer {
final HttpServer _inner;
+ String serverHeader = 'SaftHttpServer';
+ Duration idleTimeout = const Duration(seconds: 120);
static Future<SafeHttpServer> bind([String host = "localhost",
int port = 0, int backlog = 0]) {
@@ -112,6 +115,11 @@ class _HttpResponseWrapper implements HttpResponse {
_inner.contentLength = value;
}
+ Duration get deadline => _inner.deadline;
+ void set deadline(Duration value) {
+ _inner.deadline = value;
+ }
+
int get statusCode => _inner.statusCode;
set statusCode(int value) {
_inner.statusCode = value;
@@ -128,7 +136,8 @@ class _HttpResponseWrapper implements HttpResponse {
}
Encoding get encoding => _inner.encoding;
- set encoding(Encoding value) {
+
+ void set encoding(Encoding value) {
_inner.encoding = value;
}
@@ -148,4 +157,6 @@ class _HttpResponseWrapper implements HttpResponse {
void writeln([Object obj = ""]) => _inner.writeln(obj);
void addError(error, [StackTrace stackTrace]) =>
_inner.addError(error, stackTrace);
+ Future redirect(Uri location, {int status: HttpStatus.MOVED_TEMPORARILY}) =>
+ _inner.redirect(location, status: status);
}
« no previous file with comments | « pkg/http/lib/src/utils.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698