cultmesh-browser fixtures: the endpoint list and generator for the .NET chunk-URI expectations

The second column is filled by the next commit, from the generator's run on .NET 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-19 20:41:59 +02:00
commit 0d90f20886
2 changed files with 171 additions and 0 deletions

View file

@ -0,0 +1,21 @@
// Regenerates chunk-uri-dotnet.tsv: for each endpoint in its first column, the AbsoluteUri .NET 10 builds for the chunk
// request (the body of CultMeshHttpsContentTransportConnector.BuildChunkUri; recordKey "k" and the empty-content hash),
// or "THROW <exception type>" where UriBuilder refuses it. The expectations in content.test.ts are this file's output and
// nothing else; never edit the second column by hand.
// docker run --rm -v "$PWD":/w -w /w mcr.microsoft.com/dotnet/sdk:10.0 dotnet fsi packages/cultmesh-browser/test/fixtures/chunk-uri-dotnet.fsx
open System
open System.IO
let hex = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
let path = Path.Combine(__SOURCE_DIRECTORY__, "chunk-uri-dotnet.tsv")
let rows =
File.ReadAllLines(path, Text.UTF8Encoding(false))
|> Array.filter (fun line -> line <> "")
|> Array.map (fun line ->
let endpoint = line.Split('\t').[0]
try
let b = UriBuilder(endpoint)
let sep = if String.IsNullOrWhiteSpace(b.Query) then "" else b.Query.TrimStart('?') + "&"
b.Query <- sep + "chunkHash=" + Uri.EscapeDataString(hex) + "&recordKey=" + Uri.EscapeDataString("k")
endpoint + "\t" + b.Uri.AbsoluteUri
with e -> endpoint + "\tTHROW " + e.GetType().Name)
File.WriteAllText(path, String.Join("\n", rows) + "\n", Text.UTF8Encoding(false))

View file

@ -0,0 +1,150 @@
https://h/x?a=%2F
https://h/x?a=%2f
https://h/a%2fb
https://h/a%2Fb
https://h/x?a=%3A
https://H/X
https://h:443/x
https://h:0443/x
https://h:/x
https://h:65535/x
https://h/./a/../b
https://h//x
https://h/x?
https://h/x??a
https://h/x?a=[b]
https://h/[x]
https://h/x;p
https://h/x@y
https://u@h/x
https://u:p@h/x
https://0x7f.1/x
https://2130706433/x
https://127.1/x
https://[::FFFF:127.0.0.1]/x
https://[0:0:0:0:0:0:0:1]/x
https://[::1]:443/x
https://h./x
https://xn--nxasmq6b.com/x
HTTPS://h/x
https:h/x
https:/h/x
https:///h/x
https://h/x?a=%e2%82%ac
https://h/x?a=%E2%82%AC
https://h/%E2%82%AC
https://h/x?a=%5e
https://h/x?a=%5E
https://h/x?a=%60
https://h/%60
https://h/x?a=%22
https://h/x?a=%00
https://h/x?a=%0A
https://h/x?a=*
https://h/x?a=(b)
https://h/x?a=$
https://h/x?a=b?c
https://h/x#
https://h/x?#
https://h/x#f?g
https://h/x?a=b#c
https://h/x?a=b#c#d
https://h/x?a=%25
https://h/x?a=b&&c
https://h/x?&
https://h/%41
https://h/x?a=%3d
https://h/x?a=%26
https://h/x?a=%2B
https://h/x?a=+
https://h/x?a=!
https://h/x?a=,;
https://h/x/?
https://h:8443/x
https://h:8443
https://h
https://h?a
https://h#f
https://h/x?a=%7B
https://h/x?a=%7b
https://h/x?a=:@/?
https://h/:@!$&()*+,;=
https://h/x?a=~-._
https://h/x?a=%c3%a9
https://h/%c3%a9
https://h/x?a=%ff
https://h/x?a=%e2%82
https://h/x?a=%C3
https://h/x?a=%c3
https://h/%ff
https://[::ffff:7f00:1]/x
https://[2001:DB8::1]/x
https://[2001:db8:0:0:0:0:0:1]/x
https://[::]/x
https://h/x?a='b
https://h/x?a={b}|^
https://h/x?a="<>`
https://h/x?a=b c
https://h/x?a=%7e
https://h/x?a=é
https://h/{x}
https://h/a|b
https://h/a^b
https://h/a'b
https://h/x?a=b#f?g
https://h/x?#f
https://ex%41mple.com/
https://Bücher.de/
https://h/%7e
https://h/x?a=%zz
https://h/x?a=\b
https://h/a\b
https://h/x?a=1&&
https://h/x?
https://h/x?%3F
https://[::7f00:1]/x
https://[::127.0.0.1]/x
https://[64:ff9b::7f00:1]/x
https://[64:ff9b::127.0.0.1]/x
https://[::ffff:0:7f00:1]/x
https://[0:0:0:0:0:ffff:7f00:1]/x
https://[::ffff:1.2.3.4]/x
https://[::FFFF:1.2.3.4]/x
https://[::ffff:102:304]/x
https://[2001:db8::1.2.3.4]/x
https://[fe80::1%25eth0]/x
https://[::1]:8443/c
https://[1::]/x
https://[::2]/x
https://[0::0]/x
https://[2001:0db8:0000:0000:0000:0000:0000:0001]/x
https://[2001:db8:0:0:1:0:0:1]/x
https://[1:0:0:2:0:0:0:3]/x
https://[1:0:0:2:0:0:3:4]/x
HTTPS:/evil.example/c
https:////h/x
https:/\/h/x
https:
https:/
https://
https:///
https://h:80/x
http://h:80/x
http://h:443/x
https://@h/x
https://:@h/x
https://u@h
https://h/%e2%82%ac
https://h/x?a=%f0%90%90%80
https://h/x?a=%F0%90%90%80
https://h/x?a=%C3%A9
https://h/x?a=%7f
https://h/x?a=%80
https://h/%80
http://localhost:80/x
http://LOCALHOST/x
http://127.0.0.1:80
http://[::1]:80/x
http://[::1]:8080/x?a=1
https://h/x?a=%e2%82%ac%c3%a9
https://h/x?a=%E2%82%ac
Can't render this file because it contains an unexpected character in line 86 and column 15.