Skip to content

Fix SendURL functionality when the upstream lacks Content-Type

There are two cases in particular where we need to be concerned with this: Transfer-Encoding: chunked, and the legacy HTTP/1.0 behaviour where the upstream could close the connection to signal the end of the body.

The former behaviour is often seen when an upstream is translating content on the fly (e.g., in response to Accept-Encoding: gzip). The latter is less common, but we still need to support it.

The underlying problem is that on some endpoints, rails returns a Content-Length alongside its senddata header. If the URL pointed to in that header doesn't contain a Content-Length, that header is passed to the ultimate client with the response body from the URL, which is very likely to be a different size.

Closes #267 (closed)

Edited by Nick Thomas

Merge request reports