[axel-devel] [axel-Bugs][310835] load-cookies

axel-bugs at alioth.debian.org axel-bugs at alioth.debian.org
Sun May 24 15:07:45 UTC 2009


Bugs item #310835, was changed at 20.05.2008 19:17 by Philipp Hagemeister
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413085&aid=310835&group_id=100070

Status: Open
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: load-cookies 


Initial Comment:
The function load-cookies it will be extremly helpful.
I love axel, keep the great work
Thanx

----------------------------------------------------------------------

>Comment By: Philipp Hagemeister (phihag-guest)
Date: 24.05.2009 15:07

Message:
As already said, thanks for your patch, emiraga (Next time, feel free to post it at http://codereview.appspot.com/ so discussing specific lines of code is easier).

A couple of thoughts (more like incoherent ramblings derived while finishing lunch):

· Since we may want to implement other cookie storage forms, there should be a macro COOKIES
· The whole implementation should be moved to cookies.c
· What's with the g_ prefix?
· I probably misread the patch, but it seems that g_cookies, g_path and g_cookiesLoaded are static variables. That won't work with multiple connections or axel_t instances. They should be members of one of the structs
· getcookiecallback: When is argv[i] == NULL true?
· getcookiecallback: If any comparison suceeds, continue (ifs without braces are hard to read anyway)
· getcookiecallback: The third parameter of strncmp should always be sizeof(g_path).
· getcookiecallback: Why -1 in the second argument of snprintf?
· http_load_cookies: The two strncpys of "" can be simplified, no need to use strNcpy, just var[0] = '\0';
· http_load_cookies: Am I reading this wrong, or do I really need to set AXEL_COOKIES to use cookies? Can't we look in ~/.firefox/ by default or something?
· http_load_cookies: strlen(host) is superfluous, for (i=0;host[i] != '\0';i++)
· http_load_cookies: -1 again in snprintf(hostString, ... . Feel free to allocate a hostString and query of the correct size. Anyway, overly long host names should result in an error instead of a partial query
· http_load_cookies: What about single quotes in host?
· http_load_cookies: (rc!=SQLITE_OK) should probably not read g_cookies (Works fine now, but will crash when we change to dynamic memory allocation)


----------------------------------------------------------------------

Comment By: Giridhar Appaji Nag Yasa (appaji)
Date: 23.05.2009 14:23

Message:
Thank you Emir.  I will take a look at the patch and integrate it in.

----------------------------------------------------------------------

Comment By: emir aga (emiraga-guest)
Date: 23.05.2009 12:00

Message:
New version of the patch is released

 http://is.gd/ushF [emiraga.wikispaces.com]

Previous issues are fixed, some other problems still remain.
Added configure option "--ff3c".

----------------------------------------------------------------------

Comment By: emir aga (emiraga-guest)
Date: 18.05.2009 10:43

Message:
@Giridhar Appaji Nag Yasa
sqlite dependency is almost unavoidable, all just need libsqlite3-dev.
But, what I have done so far is WRONG.
http://curl.haxx.se/rfc/cookie_spec.html

Cookie handling is messier than in looks like: 
paths, domains, (with or without dot)  (how many dots?).

For instance: http://antinode.info/ftp/wget/wget-1_10_2c_vms/cookies.c

I am sorry for the inconvenience, when I fix this, I'll let you know.

----------------------------------------------------------------------

Comment By: Giridhar Appaji Nag Yasa (appaji)
Date: 27.04.2009 14:39

Message:
Emir, thank you for the patch.  I will take a look at it and get back to you in a short period of time (first look, it looks OK but I would want to avoid a sqlite dependency)

----------------------------------------------------------------------

Comment By: emir aga (emiraga-guest)
Date: 25.04.2009 08:53

Message:
I have unofficial patch, which is buggy, however it can load cookies from Firefox 3.

http://is.gd/ushF [emiraga.wikispaces.com]

To the developers: if you are interested in including this option in official release, I can improve the patch, maybe add command line option, config option or something similar. Just let me know if you are interested and what are requirements.

----------------------------------------------------------------------

Comment By: Nobody (None)
Date: 16.01.2009 03:35

Message:
yes, cookies would be a much needed function. This will allow downloading from rapidshare, megaupload, netshare and so on.

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413085&aid=310835&group_id=100070



More information about the axel-devel mailing list