I've been using your extension for several years now.
I found a bug which affects my usage while developing a download service on localhost that gives a download link that requires a cookie to work. FlashGot never passes the cookie correctly to the download manager. Specifically, it seems to have trouble associating the cookie with the link.
In the initCookies function in DMS.js, there is an attempt with regex to parse out the HTTP hostname from the link HREF. This regex is wrong and doesn't take into account that the hostname can have a port number or can be without a TLD (like localhost).
It appears Firefox doesn't store cookies with port numbers (even when the Set-Cookie header has the cookie domain parameter with port number), so when constructing the hostCookies dictionary, the port number must be ignored as well so it is passed properly to the download manager.
See patch below:
DMS.js (as of stable version 1.5.5), in initCookies function line: 379
Code: Select all
parts = l.href.match(/http[s]{0,1}:\/\/([^\/]+\.[^\/]+)/i); // host?
Code: Select all
parts = l.href.match(/https?:\/\/([^\/:]+)(:\d+)?\//i); // host?
In retrospect, there maybe an official sanctioned JS service in the framework to properly parse out URL components to prevent such bugs in the future, maybe that would be a better long term fix.
PS: Isn't there a bug tracker we can post bugs on ? Moving to bitbucket or github may help people contribute more to this project.
Cheers !