Uh oh!
There was an error while loading. Please reload this page.
[Mono.Android, Xamarin.Android.Net.AndroidClientHandler] Fix requests with content - #44
Conversation
dnfclas
commented
May 18, 2016
Hi @blounty, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
| SSLContext context = SSLContext.GetInstance ("TLS"); | ||
| context.Init (kmf?.GetKeyManagers (), tmf.GetTrustManagers (), null); | ||
| httpsConnection.SSLSocketFactory = context.SocketFactory; | ||
| }); |
There was a problem hiding this comment.
Tabs. vs. spaces mismatch. Please use tabs.
jonpryor
commented
May 19, 2016
Tests for this should be added to https://github.com/xamarin/xamarin-android/blob/master/src/Mono.Android/Test/Xamarin.Android.Net/AndroidClientHandlerTests.cs. |
LGTM - after tabs vs spaces are fixed and tests added. And please squash the commits into one, thanks :) |
dnfclas
commented
May 20, 2016
Hi @blounty, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
| ICredentials creds = data.UseProxyAuthentication ? Proxy?.Credentials : Credentials; | ||
| if (creds == null) { | ||
| if (Logger.LogNet) | ||
| if (Logger.LogNet) |
…ork with requests which contains content. Also fixed a race condition which causes the Output stream to not be ready. Fixed issues with calling on the MainThread which is not alowed with the Java HttpURLConnection updating logger incorrect calls adding fixes
jonpryor
commented
May 25, 2016
This still needs unit tests. :-) |
grendello
commented
Jun 20, 2016
@blounty I'm going to accept this seeing that more and more people run into this issue, however please provide the tests whenever you have the chance, thanks :) |
I've solved this issue in my fork: danielcaceresm@bd1f0b4 These changes are based on the AndroidClientHandler class before the modifications of this pull request. Other change I've made is to move the connection reference to the response class, this approach is better than holding the last connection in the handler. On the other hand, is pending to implement, dispose the connection if it fails while connecting. If you consider my changes, I can open a new pull request. |
grendello
commented
Jun 28, 2016
@danielcaceresm please open a separete PR |
Running `make all` would fail: make: *** No rule to make target `bin/TestDebug/Java.Interop.Tools.JavaCallableWrappers-Tests.dll', needed by `all'. Stop. This happened because `Java.Interop.Tools.JavaCallableWrappers-Tests.dll` was part of `$(TESTS)`, which is a dependency of the `all` target, but there wasn't a rule to create that file. Add a rule to create `bin/TestDebug/Java.Interop.Tools.JavaCallableWrappers-Tests.dll`.
Updated how content is handled, it seems content was not previously being added.
There also appeared to be a race condition which sometimes caused the connection output stream to no be ready at the time of writing.