Skip to content
代码片段 群组 项目
未验证 提交 b3734e7b 编辑于 作者: Stan Hu's avatar Stan Hu
浏览文件

Upgrade rack-proxy to v0.7.2

This fixes a bug that manifested with the `webpack-dev-server` and the
`thin` Web server.

When a chunked transfer is proxied from rack-proxy, the proxied HTTP
response would contain the original `Transfer-Encoding: chunked` HTTP
header. However, the body would be stripped of the chunked encoding
headers. As a result, Workhorse would fail to parse the body with the
error:

```
httputil: ReverseProxy read error during body copy: invalid byte in
chunk length
```

This occurred because the Golang chunked decoder expected to parse a
length represented as an ASCII number followed by a `\r\n`. Instead,
the first byte was a binary character from the gzipped data.

This does not occur with Puma because Puma initiates a request with an
HTTP/1.0 header and explicitly disables chunked transfers.

https://github.com/ncr/rack-proxy/pull/59 fixes this problem by
dropping the `Transfer-Encoding: chunked` header so that Workhorse
won't handle the HTTP response as a chunked transfer.

See https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues/1443
for more details.

Changelog: fixed
上级 37230728
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册