New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timob-14224: Add system-wide cookie store for httpclient #4549
Conversation
@@ -475,6 +480,7 @@ public TiHTTPClient(KrollProxy proxy) | |||
{ | |||
this.proxy = proxy; | |||
this.client = getClient(false); | |||
this.client.setCookieStore(cookieStore); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually getClient() is called in two different functions, so it's not enough just set cookie store here.
Since the cookie store is associated with the client, it is better to set it in getClient() when the http client is created.
@@ -1265,11 +1273,10 @@ public void progress(int progress) { | |||
} | |||
|
|||
Log.d(TAG, "Preparing to execute request", Log.DEBUG_MODE); | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary white spaces.
Ran the test case. I clicked "Download", then "Abort", and then "Download" again, everything works fine. But when I clicked "Abort" again, it still kept downloading. Seems it can not be aborted the second time. |
FR passed. Code reviewed and left a minor comment. |
CR & FR passed. Accepted |
timob-14224: Add system-wide cookie store for httpclient
Testing steps in JIRA.