Skip to content
Snippets Groups Projects
Commit 479c8236 authored by ajohnsen@google.com's avatar ajohnsen@google.com Committed by Natalie Weizenbaum
Browse files

Remove disable of GZIP, as it's no longer on by default anymore.

BUG=
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//592983003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@40625 260f80e4-7a28-3924-810f-c04153c831b5
parent 9e321f5c
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,6 @@ abstract class BaseServer<T> {
BaseServer(this.environment, this._server) {
shelf_io.serveRequests(_server, const shelf.Pipeline()
.addMiddleware(shelf.createMiddleware(errorHandler: _handleError))
.addMiddleware(shelf.createMiddleware(responseHandler: _disableGzip))
.addHandler(handleRequest));
}
......@@ -121,20 +120,4 @@ abstract class BaseServer<T> {
close();
return new shelf.Response.internalServerError();
}
/// Disable GZIP responses.
///
/// This is primarily to optimize pub's startup. Since the transformer
/// plug-ins are loaded over HTTP, we pay the hit to GZIP encode and decode
/// them. Disabling this improves startup time by about 5% on my test.
///
// TODO(rnystrom): Remove this when #5187 is fixed and we don't have to use
// HTTP for isolates.
_disableGzip(shelf.Response response) {
if (!response.headers.containsKey('Content-Encoding')) {
return response.change(headers: {'Content-Encoding': ''});
}
return response;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment