You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the past I've received 409 errors when the value/node to delete during a PATCH can't be found. If I recall, some of the file names changed recently, is it possible the PATCH can't find the file with the delete and so it's throwing 409?
this._rootpath is /Users/m/inrupt/node-solid-server/data and the file location is /Users/m/inrupt/node-solid-server/data/jackson.localhost/profile/card$.ttl
This means that when that line of code runs, there's still a "jackson.localhost" before profile/card which is where that's coming from. Is this how it should work?
For more context when it's 409ing it creates the error The patch could not be applied. Could not find to delete: <https://jackson.localhost:8443/profile/card#me> <http://xmlns.com/foaf/0.1/name> "jackson"
@jaxoncreed So what you mean is that, when calling mapFileToUrl with { path: '/Users/m/inrupt/node-solid-server/data/jackson.localhost/profile/card$.ttl', hostname: 'jackson.localhost' }, it gives back https://jackson.localhost:8443/jackson.localhost/profile/card? (took that from somewhere else)
I think this issue affected all PATCH requests, so it should have been detected by the test-suite. Will see if we can run the test-suite in Travis so we can use that information when reviewing PRs.
Activity
jaxoncreed commentedon Jun 12, 2019
Testing now
james-martin-jd commentedon Jun 12, 2019
In the past I've received 409 errors when the value/node to delete during a PATCH can't be found. If I recall, some of the file names changed recently, is it possible the PATCH can't find the file with the delete and so it's throwing 409?
jaxoncreed commentedon Jun 12, 2019
@RubenVerborgh In reference to 111e63b#diff-93af968f3e26d51a3f13dc503ce4b347R69
this._rootpathis/Users/m/inrupt/node-solid-server/dataand the file location is/Users/m/inrupt/node-solid-server/data/jackson.localhost/profile/card$.ttlThis means that when that line of code runs, there's still a "jackson.localhost" before profile/card which is where that's coming from. Is this how it should work?
jaxoncreed commentedon Jun 12, 2019
For more context when it's 409ing it creates the error
The patch could not be applied. Could not find to delete: <https://jackson.localhost:8443/profile/card#me> <http://xmlns.com/foaf/0.1/name> "jackson"RubenVerborgh commentedon Jun 12, 2019
@jaxoncreed So what you mean is that, when calling
mapFileToUrlwith{ path: '/Users/m/inrupt/node-solid-server/data/jackson.localhost/profile/card$.ttl', hostname: 'jackson.localhost' }, it gives backhttps://jackson.localhost:8443/jackson.localhost/profile/card? (took that from somewhere else)That would be incorrect behavior indeed.
Weird that this never popped up; corresponding tests are wrong (https://github.com/solid/node-solid-server/blob/b7b5bffd1b94f4976c04c3cf845854efecc81168/test/unit/resource-mapper-test.js#L536-L545) and should be adjusted, then the code can be fixed.
Please add me as reviewer to the PR on this one.
jaxoncreed commentedon Jun 12, 2019
Okay will do
RubenVerborgh commentedon Jun 12, 2019
@jaxoncreed So here's what you probably want to do:
startsWithcheck makes the whole thing work with relative or absolute URLs. So let's keep that one in.this._includeHostistrue, the remaining path MUST start with/HOSTNAME/.jaxoncreed commentedon Jun 12, 2019
Ah good thing you caught me before I modified "startsWith"
michielbdejong commentedon Jun 17, 2019
I think this issue affected all PATCH requests, so it should have been detected by the test-suite. Will see if we can run the test-suite in Travis so we can use that information when reviewing PRs.