Wednesday, 7 December 2016

hell yeah cookies mailman accept pls


setter Document::cookie()
%{
    /* DISCLAIMER: ONLY WORKS ON REMOTE URLS */
    const char *cookie_str;
    struct html_content *htmlc;
    dom_exception err;
   
    err = dom_node_get_user_data(priv->parent.node,
                     corestring_dom___ns_key_html_content_data,
                     &htmlc);
    if((err == DOM_NO_ERR) && (htmlc != NULL)) {
        cookie_str = duk_get_string(ctx,0);
        if(cookie_str != NULL) {
            urldb_set_cookie(cookie_str,
                     llcache_handle_get_url(htmlc->base.llcache),
                     0);
            return 1;
        }    
    } else {
        LOG("error getting htmlc. parent node:%p htmlc:%p",
            priv->parent.node, htmlc);
    }
    return 0;
%}

If mailman doesn't accept this I will sacrifice my cookies to the gods.

No comments:

Post a Comment