ArgumentError: invalid byte sequence in UTF-8
This exception causes HTTP 500 errors and makes SRE pagers go off. The HTTP status code should be something like 400 or 404 instead.
This issue was surfaced while investigating &327. Note that it is very similar to #610.
https://sentry.gitlab.net/gitlab/gitlabcom/issues/1559593/?referrer=gitlab_plugin
```
ArgumentError: invalid byte sequence in UTF-8
rack/utils.rb:599:in `split'
parts = path_info.split PATH_SEPS
rack/utils.rb:599:in `clean_path_info'
parts = path_info.split PATH_SEPS
rack/cors.rb:155:in `evaluate_path'
path = Rack::Utils.clean_path_info(Rack::Utils.unescape(path)) if path
rack/cors.rb:67:in `call'
path = evaluate_path(env)
rack/tempfile_reaper.rb:15:in `call'
status, headers, body = @app.call(env)
...
(50 additional frame(s) were not displayed)
ArgumentError: invalid byte sequence in UTF-8
```
## Proposal
In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45701 we started handling invalid strings in request parameters.
But invalid strings could also be passed in authentication headers used by the `GitHttpClientController`, which we should also reject (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46985).
issue