media3/libraries
ibaker cb04297420 Remove InvalidResponseCodeException#headerFields from the stable API
Representing HTTP headers in a `java.util.Map` is error-prone, because
the names (keys) need to be case-insensitive (per
[RFC 2616 section 4.2](https://datatracker.ietf.org/doc/html/rfc2616#section-4.2))
but this is fundamentally technically incompatible with the `Map`
interface (e.g. with headers `{"key": ["val_1", "val_2"]}` then
`get("key")` and `get("KeY")` both return the same list, but `size()`
returns `1`). It also breaks as soon as you copy the `Map` into a
non-case-insensitive (i.e. normal) `Map` implementation, e.g. Guava's
`ImmutableMap`. It's risky that a line as 'innocent' as
`ImmutableMap.copyOf(headers)` could break things so badly.

For now it's enough to keep this field unstable (it's currently the only
reference to HTTP headers in the stable API). We can consider
stabilising an improved HTTP header representation in future.

PiperOrigin-RevId: 450708598
2022-05-26 11:51:27 +00:00
..
2022-02-18 14:54:02 +00:00
2022-05-23 17:12:22 +01:00
2022-05-23 17:12:22 +01:00
2022-05-23 17:12:22 +01:00
2022-05-23 17:12:22 +01:00
2022-05-23 17:12:22 +01:00
2022-05-23 17:12:22 +01:00