Skip to content

Commit

Permalink
Merge pull request #1826 from Agoric/mfig/ag-solo-fixes
Browse files Browse the repository at this point in the history
fix: minor fixes for bootstrap and web server
  • Loading branch information
michaelfig authored Sep 30, 2020
2 parents bccad6b + 0829061 commit 926fa48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/cosmic-swingset/lib/ag-solo/vats/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ export function buildRootObject(vatPowers, vatParameters) {
send(obj, connectionHandles) {
return E(vats.http).send(obj, connectionHandles);
},
registerURLHandler(handler, path) {
return E(vats.http).registerURLHandler(handler, path);
},
registerAPIHandler(handler) {
return E(vats.http).registerURLHandler(handler, '/api');
},
Expand All @@ -248,6 +251,9 @@ export function buildRootObject(vatPowers, vatParameters) {
return allComparable(
harden({
...(plugin ? { plugin } : {}),
// TODO: Our preferred name is "scratch", but there are many Dapps
// that use "uploads".
scratch: uploads,
uploads,
spawner,
network: vats.network,
Expand Down
4 changes: 2 additions & 2 deletions packages/cosmic-swingset/lib/ag-solo/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export async function makeHTTPListener(basedir, port, host, rawInboundCommand) {
// Strip away the query params, as the inbound command device can't handle
// it and the accessToken is there.
const parsedURL = new URL(url, 'http://some-host');
const query = {};
for (const [key, val] of parsedURL.searchParams) {
const query = { isQuery: true };
for (const [key, val] of parsedURL.searchParams.entries()) {
if (key !== 'accessToken') {
query[key] = val;
}
Expand Down

0 comments on commit 926fa48

Please sign in to comment.