* cookie handler
$8 GET/PUT
- $9 request address host (if current page url is www.foo.com/somepage, this could be something else than foo, eg advertising from another host)
- $10 request address path
- $11 cookie (only with PUT requests)
+ $9 request address scheme (e.g. http or https)
+ $10 request address host (if current page url is www.foo.com/somepage, this could be something else than foo, eg advertising from another host)
+ $11 request address path
+ $12 cookie (only with PUT requests)
Custom, userdefined scripts (`spawn foo bar`) get first the arguments as specified in the config and then the above 7 are added at the end.
soup_message_add_header_handler(msg, "got-headers", "Set-Cookie", G_CALLBACK(save_cookies), NULL);
GString *s = g_string_new ("");
SoupURI * soup_uri = soup_message_get_uri(msg);
- g_string_printf(s, "GET '%s' '%s'", soup_uri->host, soup_uri->path);
+ g_string_printf(s, "GET '%s' '%s' '%s'", soup_uri->scheme, soup_uri->host, soup_uri->path);
run_handler(uzbl.behave.cookie_handler, s->str);
if(uzbl.comm.sync_stdout && strcmp (uzbl.comm.sync_stdout, "") != 0) {
cookie = soup_cookie_to_set_cookie_header(ck->data);
SoupURI * soup_uri = soup_message_get_uri(msg);
GString *s = g_string_new ("");
- g_string_printf(s, "PUT '%s' '%s' '%s'", soup_uri->host, soup_uri->path, cookie);
+ g_string_printf(s, "PUT '%s' '%s' '%s' '%s'", soup_uri->scheme, soup_uri->host, soup_uri->path, cookie);
run_handler(uzbl.behave.cookie_handler, s->str);
g_free (cookie);
g_string_free(s, TRUE);