NodeInfo is read as Mobilizon serves it

Mobilizon sends its NodeInfo as `application/json; profile=http://…#` with the URL unquoted, which .NET cannot parse,
so the document was refused for its content type and the server never described; and it names its software
"Mobilizon" where NodeInfo wants lower case. The media type is now read from the raw header when the parsed one is
missing, and software names are lowercased, so one software is counted under one name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-05 10:45:18 +02:00
1 parent 206506f5e9
commit 7f6837ccb1
4 files changed
+24 -3

No files matched your search

@@ -47,9 +47,10 @@ namespace PrivaPub.Federation.Objects
var usage = Section(root, "usage");
var users = Section(usage, "users");
var metadata = Section(root, "metadata");
// (NodeInfo wants the name in lower case; Mobilizon says "Mobilizon")
return new NodeInfoFacts(
version,
Text(software, "name", 200),
Text(software, "name", 200)?.ToLowerInvariant(),
Text(software, "version", 200),
Text(metadata, "nodeName", 200),
Plain(Text(metadata, "nodeDescription", 2000), 500),