Resolve "Gracefully handle missing Content-Length Header from API"
What does this MR do?
This MR resolves #1078 (closed). It ensures that Gitlab Pages does not include a Content-Length header if it did not receive one from the API.
By default, go's http client will handle a missing Content-Length header by using -1 as the value. If we pass this on to the client, we're actually using a value that's invalid as per the HTTP spec (see the issue for details)
This MR introduces a check whether or not the Content-Length value is valid, and only if this is true, adds a Content-Length header to its own response.
TODO
-
Feature flag
-
Added feature flag: -
This feature does not require a feature flag
-
-
I added the Changelogtrailer to the commits that need to be included in the changelog (e.g.Changelog: added) -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines
Closes #1078 (closed)
Edited by Janis Altherr