Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <mabaul@microsoft.com>2019-12-03 18:19:59 +0300
committerGitHub <noreply@github.com>2019-12-03 18:19:59 +0300
commit5951d0ebe97b523b7110d93c250c062c952201d1 (patch)
treeeba8472d2b671d7c579b3c40ca333a8a102c9d40
parent1cdb9c20946c74a88a7fa507215556fadc2c2b27 (diff)
parent55a2ec2613194859680f22517cd707a8dc0f932c (diff)
Merge pull request #374 from baulig/work-17897
[System.Net.Http]: Add workaround for #17897.
-rw-r--r--src/System.Net.Http/src/System/Net/Http/Headers/UriHeaderParser.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/System.Net.Http/src/System/Net/Http/Headers/UriHeaderParser.cs b/src/System.Net.Http/src/System/Net/Http/Headers/UriHeaderParser.cs
index a2d483f9ff..7c0444efc4 100644
--- a/src/System.Net.Http/src/System/Net/Http/Headers/UriHeaderParser.cs
+++ b/src/System.Net.Http/src/System/Net/Http/Headers/UriHeaderParser.cs
@@ -13,8 +13,17 @@ namespace System.Net.Http.Headers
{
private UriKind _uriKind;
+#if MONO
+ // FIXME: Workaround for https://github.com/mono/mono/issues/17897.
+ // This is the same as setting the MONO_URI_DOTNETRELATIVEORABSOLUTE=true
+ // environment variable.
+ // See https://github.com/mono/mono/blob/1454b010ae1165a0f2cf261b9420e32d1b52fdaf/mcs/class/referencesource/System/net/System/URI.cs#L991.
+ internal static readonly UriHeaderParser RelativeOrAbsoluteUriParser =
+ new UriHeaderParser((UriKind)300);
+#else
internal static readonly UriHeaderParser RelativeOrAbsoluteUriParser =
new UriHeaderParser(UriKind.RelativeOrAbsolute);
+#endif
private UriHeaderParser(UriKind uriKind)
: base(false)