-
Notifications
You must be signed in to change notification settings - Fork 148
remove redundant intercept of httpclient with httpmethod #427
Conversation
3b07775
to
d19bfec
Compare
e521e75
to
f02cb39
Compare
f02cb39
to
6738cc3
Compare
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.
Some questions and suggestions here @theScrabi
owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/methods/HttpBaseMethod.kt
Outdated
Show resolved
Hide resolved
var readTimeoutVal: Long? = null | ||
var readTimeoutUnit: TimeUnit? = null |
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.
Just a suggestion that could be out of scope from this PR.
We could create a new data class that receives the value and the TimeUnit
and use it here. So we could replace 2 variables with just one, and we won't need nested ?.let
to set the timeouts. Maybe a new issue to do this?
...oudComLibrary/src/main/java/com/owncloud/android/lib/common/http/methods/webdav/DavMethod.kt
Show resolved
Hide resolved
retryOnConnectionFailure?.let { retryOnConnectionFailure(it) } | ||
followRedirects?.let { followRedirects(it) } |
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.
Now that they are not nullable, we can get rid of ?.let
here, can't we?
retryOnConnectionFailure?.let { retryOnConnectionFailure(it) } | |
followRedirects?.let { followRedirects(it) } | |
retryOnConnectionFailure(retryOnConnectionFailure) | |
followRedirects(followRedirects) |
3a47679
to
3e61fb0
Compare
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.
LGTM
Let's QA a bit here... |
(1)Redirections 301 do not work in comparison with Second request is where difference rises: master && fix/okhttp_singleton :
fix/remove_redundant_client_call:
showing the error message: You can check also with This chart summarizes the results:
|
Since the redirect got changed compleatly in favour of the ConnectionValidator, it may not make sense to fix this partially. We may need to do the checks @jesmrec did on that branch to. |
Since the redirection fixes and the new behaviour is developed inside the ConnectionValidator scope, this branch and the singleton one should not be merged in order not to break the redirections, currently working in Is this OK? |
To resumen when https://github.com/owncloud/enterprise/issues/4201 is done and merged |
d19bfec
to
bcfcc82
Compare
Issue: #378
App: owncloud/android#3353
QA
Reports: