Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2927] Once I've set the authorization header for httpclient i can't change it.

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionInvalid
Resolution Date2012-08-29T14:23:25.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, authorization, httpclient, setrequestheader
Reporterglytch
AssigneeNeeraj Gupta
Created2011-04-15T03:33:08.000+0000
Updated2017-03-09T23:38:28.000+0000

Description

After setting the http basic header like this

http_client.setRequestHeader('Authorization', 'Basic ' + Titanium.Utils.base64encode(email + ':' + password));

Authentication works fine. so let's say i have a button that creates a new http_client object and makes an authenticated request. if i do it the first time everything is great. now if i change the email/password http_client keeps using the old authorization header. even on completely different http_client objects! even after i've set the header to null or set it to credentials for a different user. it always uses the first authorization header set. to log in as a different user i'm having to completely close the application and open it again.

Comments

  1. Stephen Tramer 2011-04-15

    Assuming this is an Android bug (there's no shared persistent store on iOS that would cause this issue). Assigning to Don for triage.

  2. Junaid Younus 2012-08-29

    Please attach a small runnable test case in order for us to look into this issue. No test case provided, unable to reproduce, ticket marked as invalid.
  3. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source