staticpages.ErrorPageUnless does not override content length / transfer encoding
staticpages.ErrorPageUnless injects a static error page into response bodies if upstream (gitlab) returns an error code and a matching page is found (e.g. 404.html). This feature is disabled when developmentMode
is set on the command line.
There is a bug in the implementation of this feature: if upstream sets a content-length header we pass it through unmodified, even if the size of the static error page is different. This results in an invalid HTTP response.