trax-project / trax2-starter-lrs

GNU General Public License v3.0
30 stars 19 forks source link

The "more" field contains to much data #35

Open sgamidb opened 6 months ago

sgamidb commented 6 months ago

Hello Sebastien,

The more field in get statements request returns a full URL instead of the path without scheme, host and port as specified in the specification.

Example for the request:

GET http://localhost/trax/api/***/xapi/std/statements
Authorization: Basic ***
X-Experience-API-Version: 1.0.3

I received:

{
  "statements": [...],
    "more": "http:\/\/localhost\/trax\/api\/***\/xapi\/std\/statements?before%5Bid%5D=3907"
}

It should be:

{
  "statements": [...],
    "more": "\/trax\/api\/***\/xapi\/std\/statements?before%5Bid%5D=3907"
}

Have I missed something?

sfraysse commented 6 months ago

Hi Sébastien,

You are right. The LRS conformance testsuite accepts both relative and absolute URLs. But the spec says it must be a relative URL.

Thanks for the feedback.