Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Update Zest request object

#17

Update the request object that Jucie produces to conform to the latest 0.3 proposal – this should just involve storing the Juice specific vars under env.juice instead of just juice – the rest of the updates are in Zest #1 It should look like this:

({
    jsgi: {
        version: [0, 3/*, 0*/], // no level in 0.3 L0 -- L0 doesn't care about levels
        errors: {},

        // other required jsgi keys
        multithread: false,
        multiprocess: true,
        runonce: false, // runOnce?

        // optional jsgi keys...I think -- nobody's spoken up as to why they should be required
        async: undefined // zest doesn't support promises yet, right?
        cgi: undefined, // right?
    },
    /*requestM*/method: "GET",
    scriptName: "",
    pathInfo: "/",
    queryString: "",
    scheme: "http",
    /*body*/input: {}, // tom thinks input makes more sense for stream -- a sensible "body" property could be part of Level 1
    /*serverName*/host: "tethys.config", // host -- why? F@#$ CGI, that's why!
    /*serverP*/port: /*"*/3000/*"*/, // parsed as int...why not?
    headers: {
        host: "tethys.config:3000",
        'user-agent': "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/532.3+ (KHTML, like Gecko) Version/4.0.3 Safari/531.9",
        accept: "application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5",
        'accept-language': "en-us",
        'accept-encoding': "gzip, deflate",
        connection: "keep-alive"
    },
    env: {juice: { // custom keys go in the env top level key
        params: {
            get: {},
            post: {}
        },
        docRoot: "/Users/ash/code/js/juiceframework/foo/"
    }},

    // more required keys
    version: [1, 1], // parsed HTTP level...why parsed? eh, why not :)

    // more optional keys...may as well explicitly override CGI
    authType: null, // authenticationType?
    remoteAddr: "0.0.0.0", // remoteAddress?
    remoteHost: null /* CGI::REMOTE_HOST */,
    remoteIdent: null /* CGI::REMOTE_IDENT */, // remoteIdentity?
    remoteUser: null /* CGI::REMOTE_USER */,
    serverSoftware: null /* CGI::SERVER_SOFTWARE */ // is this ever useful?
    // exclude PATH_TRANSLATED
})

Reported by Ash Berlin · October 25th, 2009 @ 12:06 PM

State: resolved
Milestone: Release 0.1
Assigned to: Ash Berlin Ash Berlin

Activity

  1. Ash Berlin
    Ash Berlin
    • State changed from new to open

    October 25th, 2009 @ 03:04 PM

  2. Dominic Baggott
    Dominic Baggott
    • State changed from open to resolved

    October 25th, 2009 @ 10:10 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.