@midwayjs/http-proxy 3.10.0 → 3.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,6 +77,11 @@ let HttpProxyMiddleware = class HttpProxyMiddleware {
77
77
  const ignoreHeaders = {
78
78
  'transfer-encoding': true,
79
79
  };
80
+ if (isStream) {
81
+ // axios does not set this real data length in stream mode
82
+ // but it decompresses the data, resulting in the wrong data length
83
+ ignoreHeaders['content-length'] = true;
84
+ }
80
85
  Object.keys(proxyResponse.headers).forEach(key => {
81
86
  if (ignoreHeaders[key.toLowerCase()]) {
82
87
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/http-proxy",
3
- "version": "3.10.0",
3
+ "version": "3.10.2",
4
4
  "description": "Midway Component for http proxy",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -29,13 +29,13 @@
29
29
  "axios": "1.2.6"
30
30
  },
31
31
  "devDependencies": {
32
- "@midwayjs/core": "^3.10.0",
33
- "@midwayjs/express": "^3.10.0",
34
- "@midwayjs/faas": "^3.10.0",
35
- "@midwayjs/koa": "^3.10.0",
36
- "@midwayjs/mock": "^3.10.0",
37
- "@midwayjs/serverless-app": "^3.10.0",
38
- "@midwayjs/web": "^3.10.0"
32
+ "@midwayjs/core": "^3.10.1",
33
+ "@midwayjs/express": "^3.10.1",
34
+ "@midwayjs/faas": "^3.10.1",
35
+ "@midwayjs/koa": "^3.10.1",
36
+ "@midwayjs/mock": "^3.10.1",
37
+ "@midwayjs/serverless-app": "^3.10.1",
38
+ "@midwayjs/web": "^3.10.1"
39
39
  },
40
- "gitHead": "33d28f1a020963404488e866432916fd15c0952c"
40
+ "gitHead": "fbc92c5528577d4560fa88494f94f27938b1cc68"
41
41
  }