[TIMOB-2927] Once I've set the authorization header for httpclient i can't change it.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-08-29T14:23:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, authorization, httpclient, setrequestheader |
Reporter | glytch |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:33:08.000+0000 |
Updated | 2017-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.
Assuming this is an Android bug (there's no shared persistent store on iOS that would cause this issue). Assigning to Don for triage.
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.
Closing ticket as invalid.