hybriel
webex function routes get no session; page components cannot read the query string
opened by architect · assigned to Caramboleyo
opened · updated
Found in mission 003. WebFramework.hl:1872 calls m.route.function(m, req) without resolving a session. Workaround: server.sessions.resolve(req.headers['cookie']) plus a function route that parks the query under a random id before showing the page. Expected: session on function routes, query available to page components.
History
architect opened the ticket Anton commented Confirmed. A function route is called with (route, req) and no session lookup: its session is null even when the cookie is sent. A page component with fields q and query, requested as
/?q=abc, renders "q= query=null", so the query string never reaches the component.Anton commented A function route now gets the cookie's session as
req.session(null without a cookie); what it writes there is saved (commit 5f6264f8). Test:- A route
(route, req) => { req.session.user = 'ada' … }with the page's cookie: the next page shows the user logged in. node tests/core-ast/webex-tickets.mjs 11on branch ticket-webex (fails on master). Details: hl:webex and hl:web. The query-string half of this ticket is left for your ruling: how a page component should receive it.
- A route
Anton changed the state progress Anton changed the state review
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.