mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Prevent slugs with trailing slashes for non-container resources
* fix: slugs ending on slash with link header cannot create containers * refactor(DataAccessorBasedStore): removing duplicate code and errors * test(ServerFetch): fix integration tests that create a container * fix: Reinstate original checks in setResource to let tests succeed * test: change to container paths to end in / on POST only * refactor: incorporate review changes * fix: Error check was too strict Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com> * test: make testcase to test allowed slash behaviour * test: removed unnecessary code from tests * test: remove metadata line and duplicate tests Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import fetch from 'cross-fetch';
|
||||
import type { App } from '../../src/init/App';
|
||||
import { LDP } from '../../src/util/Vocabularies';
|
||||
import { getPort } from '../util/Util';
|
||||
import { getDefaultVariables, getTestConfigPath, instantiateFromConfig } from './Config';
|
||||
|
||||
@@ -112,6 +113,7 @@ describe('A Solid server', (): void => {
|
||||
headers: {
|
||||
'content-type': 'text/turtle',
|
||||
slug: 'containerPOST/',
|
||||
link: `<${LDP.Container}>; rel="type"`,
|
||||
},
|
||||
body: '<a:b> <a:b> <a:b>.',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user