RusticiSoftware / TinCan.NET

C#/.NET library for Tin Can API
http://rusticisoftware.github.io/TinCan.NET/
Apache License 2.0
45 stars 56 forks source link

AgentAccount HomePage is canonicalized automatically when calling "ToString()" #41

Open FishHooks opened 6 years ago

FishHooks commented 6 years ago

Because AgentAccount.HomePage is of type System.Uri, its ToString() returns a canonicalized version of the original string (for more details, see this link and scroll down to question 4). This leads to issues the value that is stored could be different from the value that was used when creating the object. For example, the value is automatically lowercased, as evidenced by this dotnetfiddle.

There's been a similar issue with Activity IDs (see #10 for more). This could be handled similarly, or by using Uri.OriginalString like I've shown in the earlier dotnetfiddle.