Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-LD Link header in GET requests is reported to be in error but actually it is not #11

Closed
jmcanterafonseca opened this issue Nov 15, 2018 · 4 comments
Assignees
Labels

Comments

@jmcanterafonseca
Copy link

Please check the input format at

https://github.com/Fiware/NGSI-LD_Tests/blob/master/contextConsumption/retrieve_entity_with_ldcontext_test.js#L102

@kzangeli kzangeli self-assigned this Nov 17, 2018
@kzangeli
Copy link
Collaborator

This seems to be the same as issue #9.
Well, in/out.
I assumed (from examples) that the Link HTTP Header was simply a URL string.
Now I see that was a mistake ...

@kzangeli kzangeli added the bug Something isn't working label Nov 17, 2018
@kzangeli
Copy link
Collaborator

Fixed in 8b30568.

Now the format `Link: ; rel=URL; type=XXX is supported.
However, not sure what to with rel and type.
Doing nothing right now (I even stop parsing after reaching the end of the URL).
If something needs to be done about rel and type, a new issue about this should be created.

@kzangeli kzangeli added Fixed - needs validation and removed bug Something isn't working labels Nov 17, 2018
@jmcanterafonseca
Copy link
Author

this is not fixed

please check

{"body": {"details": "protocol doesn't start with 'http' nor 'https'", "title": "Link HTTP Header must be a valid URL", "type": "http://example.org/ngsi-ld/errors/BadRequestData"}, "headers": {"connection": "close", "content-length": "165", "content-type": "application/json", "date": "Tue, 20 Nov 2018 17:05:24 GMT"}, "request": {"headers": {"Accept": "application/ld+json", "Link": "<https://fiware.github.io/NGSI-LD_Tests/ldContext/testContext2.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\""}, "method": "GET", "uri": {"auth": null, "hash": null, "host": "localhost:1030", "hostname": "localhost", "href": "http://localhost:1030/ngsi-ld/v1/entities/urn%3Angsi-ld%3AT%3A1542733523802?attrs=P1", "path": "/ngsi-ld/v1/entities/urn%3Angsi-ld%3AT%3A1542733523802?attrs=P1", "pathname": "/ngsi-ld/v1/entities/urn%3Angsi-ld%3AT%3A1542733523802", "port": "1030", "protocol": "http:", "query": "attrs=P1", "search": "?attrs=P1", "slashes": true}}, "statusCode": 400}

@jmcanterafonseca jmcanterafonseca added bug Something isn't working and removed Fixed - needs validation labels Nov 20, 2018
@kzangeli
Copy link
Collaborator

This seems to be a problem with the version of orionld.
The issue should be fixed.
All functests of orionld work with the "new" format of Link HTTP Header.
If it fails somehow, I'd need detailed info on the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants