diff --git a/README.md b/README.md index 142e1e9d..4ad88311 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_proxy -![version 1.0.0-dev+3](https://img.shields.io/badge/version-1.0.0--dev+3-red.svg) +![version 1.0.0-dev+6](https://img.shields.io/badge/version-1.0.0--dev+6-red.svg) ![build status](https://travis-ci.org/angel-dart/proxy.svg?branch=master) Angel middleware to forward requests to another server (i.e. pub serve). diff --git a/lib/src/proxy_layer.dart b/lib/src/proxy_layer.dart index 1152a46f..b54db36e 100644 --- a/lib/src/proxy_layer.dart +++ b/lib/src/proxy_layer.dart @@ -22,7 +22,9 @@ String _pathify(String path) { /// Copies HTTP headers ;) void copyHeaders(HttpHeaders from, HttpHeaders to) { - from.forEach(to.set); + from.forEach((k, v) { + if (k != HttpHeaders.CONTENT_ENCODING || !v.contains('gzip')) to.set(k, v); + }); /*to ..chunkedTransferEncoding = from.chunkedTransferEncoding diff --git a/pubspec.yaml b/pubspec.yaml index 3a09ad81..3298dc5d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_proxy description: Angel middleware to forward requests to another server (i.e. pub serve). -version: 1.0.0-dev+5 +version: 1.0.0-dev+6 author: Tobe O homepage: https://github.com/angel-dart/proxy environment: