Hello
On 17.07.10, you wrote:
> On Sat, 2010-07-17 at 13:39 +0200, Bernd Roesch wrote:
>> Hi,
>>
>> cookies in netsurf are not store to disk on SDL Port, so on a new
>> start of netsurf all login on
>> pages that can keep login(by check for cookie) must be done again.
>>
>> Is it possible to save the cookie to disk and check on disk, or is
>> that something backend specific ?
>
> Yes, it's possible: make the framebuffer frontend load data into urldb
> on initialisation and save data from urldb on finalisation, just like
> all the other frontends.
>
> Patches welcome.
I try it out, a cookiefile is correct written so the writing work ok.
But loading fail with a assert.see what i add.
void gui_quit(void)
{
LOG(("gui_quit"));
+ urldb_save_cookies(option_cookie_file);
framebuffer_finalise();
/* We don't care if this fails as we're about to exit, anyway */
hubbub_finalise(ns_realloc, NULL);
}
but in second start when the cookie file can load it stop here.
void urldb_load_cookies(const char *filename)
{
.....
SKIP_T; scheme = p; FIND_T;
SKIP_T; url = p; FIND_T;
/* Comment may have no content, so don't
* use macros as they'll break */
for (; *p && *p == '\t'; p++)
; /* do nothing */
comment = p;
------> assert(p <= end);
when i look in debugger address 1(dont know what var it is) is 1 pos after "d"
in "unused" text(its
0).and address 2 is 2 bytes after the "d"
its too 0
i add the load in that place.is there something wrong ?
I see that amiga and riscos have a init code and a cookie.c file, that do
something, but i see in
gtk Version
there is no init, just the load.
static void gui_init(int argc, char** argv)
{
.....
nsfb = framebuffer_initialise(fename, fewidth, feheight, febpp);
if (nsfb == NULL)
die("Unable to initialise framebuffer");
framebuffer_set_cursor(NULL);
if (fb_font_init() == false)
die("Unable to initialise the font system");
fbtk = fbtk_init(nsfb);
+ urldb_load_cookies(option_cookie_file);
if (bwfocus == 0)
>
the cookiefile that is create look as this. .... is cookie information i post
only begin and end
# >progdir:cookiefile
# NetSurf cookies file.
#
# Lines starting with a '#' are comments, blank lines are ignored.
#
# All lines prior to "Version: 101" are discarded.
#
# Version Domain Domain from Set-Cookie Path Path from Set-Cookie
Secure Expires Last
used No destroy Name Value Value was quoted Scheme URL Comment
Version: 101
0 .google.de 1 ....... unused unused
..............
>
> J.
>
Regards