Bug 165408

Summary: --load-cookies documentation incorrect
Product: [Fedora] Fedora Reporter: Evan Clarke <evanclarke>
Component: wgetAssignee: Karsten Hopp <karsten>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: moritz
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-08 14:50:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Evan Clarke 2005-08-09 01:05:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6

Description of problem:
[evan@localhost Downloads]$ wget --help | grep cookie
--cookies=off         don't use cookies.        
--load-cookies=FILE   load cookies from FILE before session.        --save-cookies=FILE   save cookies to FILE after session.

Using --load-cookies=~/.mozilla/firefox/8et9e9ic.default/cookies.txt does not work, but omitting the = makes it work, ie:
wget --delete-after --load-cookies ~/.mozilla/firefox/8et9e9ic.default/cookies.txt

The documentation should be altered to reflect this.

Version-Release number of selected component (if applicable):
wget-1.9.1-22

How reproducible:
Always

Steps to Reproduce:
1.wget --load-cookies=~/.mozilla/firefox/8et9e9ic.default/cookies.txt does not use the cookies.
2. wget --load-cookies ~/.mozilla/firefox/8et9e9ic.default/cookies.tx does use the cookies.
3.
  

Additional info:

Comment 1 Karsten Hopp 2005-09-08 14:50:08 UTC
fixed in rawhide

Comment 2 Moritz Barsnick 2005-10-11 11:40:30 UTC
I propose to change this bug, or at least its wording. I haven't looked at the 
fix, but I looked at the bug, though the report does not verbosely say what went 
wrong.

The documentation is basically correct. What wget does not do though is to 
expand the tilde. (This restriction probably applies to tons of programs and 
might even be a general usability issue.)

I tried
wget --load-cookies=~/.mozilla/firefox/blabla.default/cookies.txt
vs.
wget --load-cookies=$HOME/.mozilla/firefox/blabla.default/cookies.txt
and got an error message on the former syntax:

Cannot open cookies file `~/.mozilla/firefox/zzhw8guq.default/cookies.txt': No 
such file or directory

as wget does not realize "~" means /home/userid (or whatever), or "~userid" 
means /home/userid.

So I suggest either
a) leaving the documentation as is, as it is basically correct
or
a2) adding a note
or
b) changing (not "fixing") the documentation as is done in the original 
resolution of this bug, as it is the alternative syntax which works due to 
program vs. shell expansion
or
c) adding support for tilde expansion on any file names given on the command 
line or in config files (dunno how hard this really is)

Actually I just wanted to point out and clarify that the documentation was 
indeed not "incorrect".