Skip to content

Cloud Foundry How Tos - Change in Cloud Foundry Gorouter which may require customer action


Golang 1.15 introduced stricter transfer-encoding header standards for reverse proxies, ie. Gorouter which is used in Cloud Foundry.
Spring (and other app frameworks) are in charge of setting the Transfer Encoding header. If the app developers decide to set this header themselves, the header might be set twice (two identical keys each with a value) or the header might have two values. Before golang 1.15, these duplicated headers or headers with two values were considered valid. However, golang 1.15 is more strict and is now considering this an invalid response.

Which apps are affected?

This only affects apps that use the Transfer Encoding header and either have more than one field for it set, or use values other than chunked.

What do the symptoms look like?

Apps that encounter this issue will process requests successfully, but the gorouter will fail to process the response and return 502 instead.

How can you avoid the issue?

Make sure that your app only uses one field with the value chunked for the Transfer Encoding header.

More Details

For further information, refer to Cloud Foundry Routing Release.

Last update: July 6, 2023

Except where otherwise noted, content on this site is licensed under the Development License Agreement.