Re: Debian bug 88176 - timestamping is wrong with -O

2002-04-10 Thread Hrvoje Niksic

Unfortunately, this bug is not easy to fix.  The problem is that `-O'
was originally invented for streaming, i.e. for `-O -'.  As a result,
many places in Wget's code assume that they can freely operate on the
file names, and -O seems more like an afterthought.

On the other hand, many people (reasonably) expect `-O x' to simply
override the file name from whatever was specified in the URL to x.
But the code doesn't work that way.

I plan to change the handling of file names to make this work, but
that will take some time.  Unless someone takes time to fix this in
the existing code base, the bug will remain open until the said
reorganization.  Until then, the workaround is to avoid the `-O -N'
combination.



Debian bug 88176 - timestamping is wrong with -O

2002-02-06 Thread Guillaume Morin

Hi,

I am forwarding to you Debian bug 88176.
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88176repeatmerged=yes)

I can reproduce the problem with 1.8.1



The following transcript shows that the wget can do the Bad Thing with
-O when timestamping.
It can result on a 0 byte long result which reported as hit or in a
redownload which isn't
needed, so it is a bandwidth waste.

gegehost:/alma# ls -l
total 0
gegehost:/alma# wget
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
--23:08:25--
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
   = `bombardier_0.6-1.dsc'
Connecting to ftp.hu.debian.org:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 549 [text/plain]

0K -[100%]

23:08:25 (8.65 KB/s) - `bombardier_0.6-1.dsc' saved [549/549]

gegehost:/alma# wget -N
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
--23:08:32--
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
   = `bombardier_0.6-1.dsc'
Connecting to ftp.hu.debian.org:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 549 [text/plain]
Server file no newer than local file `bombardier_0.6-1.dsc' -- not
retrieving.

gegehost:/alma# wget -O foo -N
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
--23:09:12--
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
   = `foo'
Connecting to ftp.hu.debian.org:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 549 [text/plain]
Server file no newer than local file `bombardier_0.6-1.dsc' -- not
retrieving.

gegehost:/alma# ls -l
total 4
-rw-r--r--1 root root  549 Dec 14 19:40
bombardier_0.6-1.dsc
-rw-r--r--1 root root0 Mar  1 23:09 foo
gegehost:/alma# rm *
gegehost:/alma# wget -O foo
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
--23:09:32--
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
   = `foo'
Connecting to ftp.hu.debian.org:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 549 [text/plain]

0K -[100%]

23:09:33 (536.13 KB/s) - `foo' saved [549/549]

gegehost:/alma# wget -O foo -N
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
--23:09:38--
http://ftp.hu.debian.org/ftp/debian/pool/main/b/bombardier/bombardier_0.6-1.dsc
   = `foo'
Connecting to ftp.hu.debian.org:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 549 [text/plain]

0K -[100%]

23:09:39 (59.57 KB/s) - `foo' saved [549/549]



Please keep [EMAIL PROTECTED] CC'ed.

Any comments welcome.

-- 
Guillaume Morin [EMAIL PROTECTED]

Marianne rebelle me disait qu'elle est plus jolie métissée (Noir Désir)