Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27701] iOS: Changing request-header in HTTPClient re-appends the new header value

GitHub Issuen/a
TypeBug
PriorityCritical
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
LabelsengTriage, httpclient, ios, requestHeader
ReporterHans Knöchel
AssigneeUnknown
Created2019-12-30T12:01:44.000+0000
Updated2020-09-23T08:20:03.000+0000

Description

We noticed that if we re-run a request with new request headers (e.g. with a new access token), the new header value is just appended to the old header instead of overwriting the the value. For example, if my initial request has request.setRequestHeader('Test', 'myValue'); and I overwrite it with request.setRequestHeader('Test', 'myNewValue');, the actual header sent to the server is 'Test: myValue, myNewValue'. This is very critical for production grade apps! I would fix it myself, but unfortunately APSHTTPClient (the library used internally) is closed source.

Comments

  1. Hans Knöchel 2020-09-23

    Any update on this?

JSON Source