RusticiSoftware/TinCan.NET

Saving of agent/activity profiles is broken

madmox opened this issue · 0 comments

According to the xAPI specification:

A Client making a PUT request to either the Agent Profile Resource or Activity Profile Resource MUST include the "If-Match" header or the If-None-Match header.

This breaks the RemoteLRS.SaveActivityProfile() and RemoteLRS.SaveAgentProfile() methods, as they don't set any of these headers and don't expose the possibility to manage them. These methods are unusable with the ADL LRS, or any LRS strictly following the specification.

A quick test using TinCanJS shows that the client sends the following header with the PUT request: If-None-Match:*.

Side note
The ADL LRS has a strange behavior when handling the request without If-None-Match header. It returns a HTTP 400 status code (as expected), but a subsequent call listing the profiles associated with the activity or agent (ex : GET https://lrs.adlnet.gov/xAPI/activities/profile?activityId=xxx) returns a list containing the ID of the profile included in the invalid request. The associated document is empty.