Signal-iOS/SignalMessaging
Max Radermacher 0fb57a74ae
Fix various bugs in OWSHttpHeaders
First, `OWSHttpHeaders(httpHeaders:)` completely ignored its argument.
This doesn’t actually seem to have led to any bugs in practice; one time
the caller appears to have worked around the bug by adding the headers
again, and another time the caller relied on `allHTTPHeaderFields`
ignoring unrelated values.

Second, `URLRequest` has both `addValue` and `setValue` methods for its
headers. The former will construct a comma-separated list if the header
is already set, and the latter will replace it if it’s already set. (If
the header hasn’t been set, the two are equivalent, which is why call
sites weren’t broken even though they used the wrong method.) This was
broken only in multi-part uploads, but it was broken for "User-Agent"
and "Accept-Language", both of which are non-critical.

Third, `URLRequest`’s `allHTTPHeaderFields` doesn’t behave the way you
might expect. There’s a unit test which demonstrates some of the weird
behaviors, but any fields that aren’t present in the assigned value
aren’t touched. It seems as though most code was written as if calling
this method would fully replace *all* the HTTP headers. (The
`replace(…)` and `removeAllHeaders` methods have been removed because
they didn’t do what you’d think, and they weren’t necessary.)

Also:
* Remove Obj-C support from OWSHttpHeaders
* Move & simplify tests for HTTP Retry-After header
* Remove unused `asConnectionFailureError` method
2022-11-22 11:43:55 -08:00
..
attachments Add all JobQueues to environment, via a wrapper 2022-11-09 14:08:44 -06:00
calls Fix various bugs in OWSHttpHeaders 2022-11-22 11:43:55 -08:00
categories Use title casing in filenames 2022-11-10 19:08:44 -08:00
contacts Add ContactDiscoveryManager 2022-11-15 13:37:28 -08:00
environment Add ContactDiscoveryManager 2022-11-15 13:37:28 -08:00
groups Add ContactDiscoveryManager 2022-11-15 13:37:28 -08:00
Jobs Cleanups to subscription manager methods 2022-11-16 15:50:38 -06:00
Notifications Group calls: separate new/existing member safety number notifications 2022-11-14 10:01:04 -08:00
Payments Hide Apple Pay UI when the server disallows your region 2022-11-10 16:19:47 -06:00
profiles Drop deprecated credentials asynchronously 2022-11-15 12:49:20 -08:00
Storage Service Make it explicit where we download missing avatars 2022-11-03 16:58:49 -07:00
Subscriptions Add skeleton credit/debit card donation support 2022-11-22 09:07:36 -06:00
test Add FiatMoney type 2022-10-26 17:04:51 -05:00
utils Group calls: separate new/existing member safety number notifications 2022-11-14 10:01:04 -08:00
Info.plist Shared framework between app and extension 2017-11-29 13:58:27 -08:00
SignalMessaging-Prefix.pch Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalMessaging.h Change license to AGPL 2022-10-13 08:25:37 -05:00