in reply to Session being destroyed

Successful establishment of a session requires that a Set-Cookie: round trip must happen between the client and the host, before any other HTTP requests arrive which referenc this same session-id. It sounds like the asynchronous HTTP requests which ask for the images are using a session-cookie that hasn't been established on the host yet ... or maybe, that do not yet have a session-id value to send. Use the browser's debuggers to carefully watch the round-trip ordering of the various HTTP exchanges. This is a fundamental HTTP-design issue which is not peculiar to Perl.

Replies are listed 'Best First'.
Re^2: Session being destroyed
by FZ (Initiate) on Jun 27, 2018 at 05:37 UTC
    There is only request cookie in case it works. Which is something like:


    Request cookies:
    dancer.session WzFwlwAAbcptBdxFGkBSF1u6KnoEbIF0

    For fail case there is also a response cookie and it is different:

    Request cookies:
    dancer.session WzFwlwAAbcptBdxFGkBSF1u6KnoEbIF0

    Response cookies:
    dancer.session
    httpOnly true
    path /
    value WzFw_gAAbcrid2OMH0ZSxymggqHS6DKq


    I have also verified that a new physical dancer session file (empty) is created as soon as session is destroyed.