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-25744] iOS: Fix http post data leak #43
Conversation
@vijaysingh-axway We likely need to do the same for your NSURLSession change. |
@vijaysingh-axway Ping on the review! |
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.
Please create PR for titanium_moble with updated library also. Thanks!
@@ -413,6 +413,8 @@ - (void)responseFinished | |||
[self invokeCallbackWithState:APSHTTPCallbackStateDataStream]; | |||
|
|||
[self invokeCallbackWithState:APSHTTPCallbackStateLoad]; | |||
|
|||
[[self postForm] destroyTemporaryData]; |
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.
This line should be added in error block of
"- (void)URLSession:(nonnull NSURLSession *)session task:(nonnull NSURLSessionTask *)task didCompleteWithError:(nullable NSError *)error".
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.
Mhh, it is already. But it should also be here to be used on successful POST requests. Or do you have objections there?
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.
This is fine here. But in following section also it should be there. Reason is function get return from error block, if error happens.
- (void)URLSession:(nonnull NSURLSession *)session task:(nonnull NSURLSessionTask *)task didCompleteWithError:(nullable NSError *)error
{
if (error != NULL) {
DebugLog(@"%s", __PRETTY_FUNCTION__);
self.response.readyState = APSHTTPResponseStateDone;
[self invokeCallbackWithState:APSHTTPCallbackStateReadyState];
self.response.connected = NO;
self.response.error = error;
[self invokeCallbackWithState:APSHTTPCallbackStateError];
return;
}
@vijaysingh-axway PR updated |
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.
CR passed
JIRA: https://jira.appcelerator.org/browse/TIMOB-25744