Support binary headers, metadata, query parameters - 17.5 backport
This is a backport of:
- Various refactorings (!1911 - merged)
- Support passing empty and binary gRPC metadata ... (!1927 - merged)
- Support passing empty and binary HTTP header va... (!1932 - merged)
- Support passing binary HTTP query keys and values (!1942 - merged)
for %17.5.
Relates to https://gitlab.com/gitlab-com/ops-sub-department/section-ops-request-for-help/-/issues/451.
- Support passing binary HTTP query keys and values
https://www.rfc-editor.org/rfc/rfc3986#section-3.4.
Changelog: fixed (cherry picked from commit de9232be)
- Validate proto messages in tests
(cherry picked from commit 3ed4322c)
- Rename EquateHeaderKV -> Equate
(cherry picked from commit fc834a16)
- Extract common code into StringMapToSliceWithBytes
(cherry picked from commit f52eef0e)
- Rename ValuesMapToURLValues -> QueryKVToURLValues
(cherry picked from commit b14568fe)
- Rename URLValuesToValuesMap -> URLValuesToQueryKV
(cherry picked from commit b2178e10)
- Extract buffering logic into Accumulator for reuse
(cherry picked from commit dfb09faf)
- Improve types
(cherry picked from commit 26439df5)
- Support passing empty and binary HTTP header values
https://www.rfc-editor.org/rfc/rfc9110.html#name-field-values.
Changelog: fixed
(cherry picked from commit 12576e86)
- Support passing empty and binary gRPC metadata values
(cherry picked from commit d0dd344f)
- Cleanup function signature
(cherry picked from commit 45137dff)
- Move helpers into separate file
(cherry picked from commit 1c73aedb)