Skip to content

Commit

Permalink
fix: Execute only one main handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimvh committed Dec 18, 2020
1 parent a721684 commit 2443f2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions config/presets/http.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@
"@id": "urn:solid-server:default:Middleware"
},
{
"@id": "urn:solid-server:default:PodManagerHandler"
},
{
"@id": "urn:solid-server:default:LdpHandler"
"@type": "WaterfallHandler",
"WaterfallHandler:_handlers": [
{
"@id": "urn:solid-server:default:PodManagerHandler"
},
{
"@id": "urn:solid-server:default:LdpHandler"
}
]
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion test/integration/Middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { HttpHandler } from '../../src/server/HttpHandler';
import type { HttpRequest } from '../../src/server/HttpRequest';
import type { HttpResponse } from '../../src/server/HttpResponse';
import { instantiateFromConfig } from '../configs/Util';
import { StaticAsyncHandler } from '../util/StaticAsyncHandler';

const port = 6002;

Expand All @@ -21,7 +22,7 @@ describe('An Express server with middleware', (): void => {
beforeAll(async(): Promise<void> => {
const factory = await instantiateFromConfig(
'urn:solid-server:default:ExpressHttpServerFactory', 'middleware.json', {
'urn:solid-server:default:PodManagerHandler': new SimpleHttpHandler(),
'urn:solid-server:default:PodManagerHandler': new StaticAsyncHandler(false, null),
'urn:solid-server:default:LdpHandler': new SimpleHttpHandler(),
'urn:solid-server:default:variable:port': port,
'urn:solid-server:default:variable:baseUrl': 'https://example.pod/',
Expand Down

0 comments on commit 2443f2c

Please sign in to comment.