Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm curious if part of the problem is that you are only accounting for "don't compress path", instead of all the defaults of the base HTTP parser: (including UnEscapeDotsAndSlashes)</p> <pre><code> private const UriSyntaxFlags HttpSyntaxFlags = (UriSyntaxFlags.AllowIriParsing | UriSyntaxFlags.AllowIdn | UriSyntaxFlags.UnEscapeDotsAndSlashes | UriSyntaxFlags.CanonicalizeAsFilePath | UriSyntaxFlags.CompressPath | UriSyntaxFlags.ConvertPathSlashes | UriSyntaxFlags.PathIsRooted | UriSyntaxFlags.AllowAnInternetHost | UriSyntaxFlags.AllowUncHost | UriSyntaxFlags.MayHaveFragment | UriSyntaxFlags.MayHaveQuery | UriSyntaxFlags.MayHavePath | UriSyntaxFlags.MayHavePort | UriSyntaxFlags.MayHaveUserInfo | UriSyntaxFlags.MustHaveAuthority); </code></pre> <p>That's as opposed to the news that has flags (for instance):</p> <pre><code> private const UriSyntaxFlags NewsSyntaxFlags = (UriSyntaxFlags.AllowIriParsing | UriSyntaxFlags.MayHaveFragment | UriSyntaxFlags.MayHavePath); </code></pre> <p>Dang, Brandon Black beat me to it while I was working on typing things up...</p> <p>This may help with code readability:</p> <pre><code>namespace System { [Flags] internal enum UriSyntaxFlags { AllowAnInternetHost = 0xe00, AllowAnyOtherHost = 0x1000, AllowDnsHost = 0x200, AllowDOSPath = 0x100000, AllowEmptyHost = 0x80, AllowIdn = 0x4000000, AllowIPv4Host = 0x400, AllowIPv6Host = 0x800, AllowIriParsing = 0x10000000, AllowUncHost = 0x100, BuiltInSyntax = 0x40000, CanonicalizeAsFilePath = 0x1000000, CompressPath = 0x800000, ConvertPathSlashes = 0x400000, FileLikeUri = 0x2000, MailToLikeUri = 0x4000, MayHaveFragment = 0x40, MayHavePath = 0x10, MayHavePort = 8, MayHaveQuery = 0x20, MayHaveUserInfo = 4, MustHaveAuthority = 1, OptionalAuthority = 2, ParserSchemeOnly = 0x80000, PathIsRooted = 0x200000, SimpleUserSyntax = 0x20000, UnEscapeDotsAndSlashes = 0x2000000, V1_UnknownUri = 0x10000 } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload