AndroidClientHandler doesn't allow arbitrary HTTP methods #3544
Labels
Area: App Runtime
Issues in `libmonodroid.so`.
enhancement
Proposed change to current functionality.
Milestone
Steps to Reproduce
Expected Behavior
Makes the request.
Actual Behavior
Throws:
The underlying problem is in
java.net.HttpURLConnection
. This class has strong opinions on what is or isn't a valid HTTP method— that's a known issue, and the recommended workaround is simply to use a newer Java API. Therefore AndroidClientHandler isn't a fully compliant implementation of the .NET/Xamarin HTTP APIs, which don't have any such limitation on what HTTP methods you can use.(It's true that REPORT isn't a standard HTTP method, but it's been spec'd and used for years, and general-purpose HTTP clients normally do not prohibit you from using any method you want; they just assume that if the server can't handle it, you'll get an error and that's your problem. And that is true of .NET and Xamarin... unless you use AndroidClientHandler.)
Version Information
=== Visual Studio Community 2019 for Mac ===
Version 8.2.4 (build 17)
Installation UUID: 2a7c02a1-941a-4806-b4e6-0b4549aa6ed2
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.14.0.85 (d16-2-fix-mac-updates / 86973979)
=== Mono Framework MDK ===
Runtime:
Mono 6.0.0.327 (2019-02/f8ea05bddcb) (64-bit)
Package version: 600000327
=== NuGet ===
Version: 5.1.0.6013
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.12
2.1.11
2.1.9
2.1.2
2.1.1
2.0.5
1.1.4
1.0.7
SDK: /usr/local/share/dotnet/sdk/2.1.701/Sdks
SDK Versions:
2.1.701
2.1.700
2.1.505
2.1.302
2.1.301
2.1.4
1.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.0.0/lib/mono/msbuild/Current/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.11
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Apple Developer Tools ===
Xcode 10.2.1 (14490.122)
Build 10E1001
=== Xamarin.Mac ===
Version: 5.14.0.110 (Visual Studio Community)
Hash: a8bcecce
Branch: d16-2
Build date: 2019-06-28 07:31:43-0400
=== Xamarin.iOS ===
Version: 12.14.0.110 (Visual Studio Community)
Hash: a8bcecce
Branch: d16-2
Build date: 2019-06-28 07:31:42-0400
=== Xamarin.Android ===
Version: 9.4.0.51 (Visual Studio Community)
Commit: xamarin-android/d16-2/9fa7775
Android SDK: /Users/elibishop/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.1
SDK Build Tools Version: 28.0.3
Build Information:
Mono: mono/mono@e6f5369c2d2
Java.Interop: xamarin/java.interop/d16-2@d64ada5
LibZipSharp: grendello/LibZipSharp/d16-2@caa0c74
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-2@6f6c969
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/elibishop/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 1.2.0.60
Hash: 686c817
Branch: remotes/origin/d16-2
Build date: 2019-08-07 15:49:58 UTC
=== Xamarin Designer ===
Version: 16.2.0.379
Hash: 3f0652957
Branch: remotes/origin/d16-2
Build date: 2019-08-01 17:32:50 UTC
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 802040017
Git revision: 9b155edbf23e9fe8b477b3236a342164fabf5f6b
Build date: 2019-08-16 00:21:01+00
Build branch: release-8.2
Xamarin extensions: 9f2598b5f2371ba2903988c2cd87a9759d0255f2
=== Operating System ===
Mac OS X 10.14.5
Darwin 18.6.0 Darwin Kernel Version 18.6.0
Thu Apr 25 23:16:27 PDT 2019
root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Log File
n/a
The text was updated successfully, but these errors were encountered: