wget 1.11 beta1 another time-stamping problem

2006-08-27 Thread Jochen Roderburg

Unfortunately the time-stamping saga continues  ;-)

In the time-stamping mode wget always issued first a HEAD request when there was
a local file, and later a GET request when after inspecting the HEAD outpout it
found out that it should do so.

The wget 1.11 now *always* does the HEAD request, so this problem may be a
little related to the other just-repaired problem.
The error, however, is that it now uses the time-data from the HEAD output as
timestamp for the local file and not the time-data from the GET request.

This could theoretically even be a problem with a direct site-transfer, when the
remote file changes between the HEAD and the GET, but the pratical case where it
occured is in connection with a proxy-cache. When the proxy-cache has a cached
file-copy which is older than the file on the orginal site, the HEAD delivers
the data from the cached file, but when upon the GET the proxy itself decides
to retrieve the newer version (or is forced to do that with the wget --no-cache
option) we get the discrepancy: we get the *newer* file downloaded but with the
*older* time-stamp.

And a real-life example to illustrate the issue:


HEAD -p http://wwwcache.uni-koeln.de:8080
http://www.extractnow.com/extractnow.exe

200 OK
Date: Wed, 23 Aug 2006 12:15:42 GMT
Accept-Ranges: bytes
Age: 165431
ETag: "98caa15d43c4c61:4da"
Server: Microsoft-IIS/6.0
Content-Length: 981504
Content-Type: application/octet-stream
Last-Modified: Sun, 20 Aug 2006 10:28:23 GMT
Client-Date: Sun, 27 Aug 2006 10:03:17 GMT
Client-Response-Num: 1
Proxy-Connection: close
X-Cache: HIT from wwwcache.uni-koeln.de
X-Powered-By: ASP.NET

HEAD http://www.extractnow.com/extractnow.exe

200 OK
Date: Sun, 27 Aug 2006 10:05:10 GMT
Accept-Ranges: bytes
ETag: "4e9432fc57c9c61:4da"
Server: Microsoft-IIS/6.0
Content-Length: 983005
Content-Type: application/octet-stream
Last-Modified: Sat, 26 Aug 2006 21:38:35 GMT
Client-Date: Sun, 27 Aug 2006 10:05:09 GMT
Client-Response-Num: 1
X-Powered-By: ASP.NET


The two HEAD (HEAD utility from the lwp-package) requests show that the
cache has a file version from 20 Aug 2006 and the site has a file version from
26 Aug 2006


wget.111b1 -d http://www.extractnow.com/extractnow.exe

DEBUG output created by Wget 1.11-beta-1 on linux-gnu.

--12:06:18--  http://www.extractnow.com/extractnow.exe
Resolving wwwcache.uni-koeln.de... 134.95.19.61
Caching wwwcache.uni-koeln.de => 134.95.19.61
Connecting to wwwcache.uni-koeln.de|134.95.19.61|:8080... connected.
Created socket 3.
Releasing 0x08086950 (new refcount 1).

---request begin---
HEAD http://www.extractnow.com/extractnow.exe HTTP/1.0
User-Agent: Wget/1.11-beta-1
Accept: */*
Host: www.extractnow.com

---request end---
Proxy request sent, awaiting response...
---response begin---
HTTP/1.0 200 OK
Content-Length: 981504
Content-Type: application/octet-stream
Last-Modified: Sun, 20 Aug 2006 10:28:23 GMT
Accept-Ranges: bytes
ETag: "98caa15d43c4c61:4da"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Wed, 23 Aug 2006 12:15:42 GMT
Age: 165612
X-Cache: HIT from wwwcache.uni-koeln.de
Proxy-Connection: close

---response end---
200 OK
Length: 981504 (958K) [application/octet-stream]
Closed fd 3
--12:06:18--  http://www.extractnow.com/extractnow.exe
Found wwwcache.uni-koeln.de in host_name_addresses_map (0x8086950)
Connecting to wwwcache.uni-koeln.de|134.95.19.61|:8080... connected.
Created socket 3.
Releasing 0x08086950 (new refcount 1).

---request begin---
GET http://www.extractnow.com/extractnow.exe HTTP/1.0
User-Agent: Wget/1.11-beta-1
Accept: */*
Host: www.extractnow.com

---request end---
Proxy request sent, awaiting response...
---response begin---
HTTP/1.0 200 OK
Content-Length: 983005
Content-Type: application/octet-stream
Last-Modified: Sat, 26 Aug 2006 21:38:35 GMT
Accept-Ranges: bytes
ETag: "4e9432fc57c9c61:4da"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Sun, 27 Aug 2006 10:06:20 GMT
X-Cache: MISS from wwwcache.uni-koeln.de
Proxy-Connection: close

---response end---
200 OK
Length: 983005 (960K) [application/octet-stream]
Saving to: `extractnow.exe'

100%[>] 983,005
265K/s   in 3.6
s

Closed fd 3
12:06:22 (265 KB/s) - `extractnow.exe' saved [983005/983005]


And the result on the local disk:

...983005 20.08.2006 12:28 extractnow.exe

The filesizes show that the newer version was downloaded but it got the
time-stamp of the older one.


Btw, a quick work-around is to download it a second time, the cache has now the
newer file with newer file data, wget requests it new because it now sees the
local file as older, the file is retrieved directly from the cache and gets the
correct time-stamp now  ;-)


Best regards,
Jochen Roderburg




wget 1.11 beta1 SSL configuration problem

2006-08-27 Thread Jochen Roderburg

There seems to a configure problem with the options to specify the directories
where the SSL installation resides.

I have the SSL that I want in /usr/local and in wget 1.10.2 the configure option
--with-libssl-prefix=/usr/local worked.

Part of configure output:

checking for libssl... yes
checking how to link with libssl... /usr/local/lib/libssl.so
/usr/local/lib/libcrypto.so -Wl,-rpath
-Wl,/usr/local/lib
configure: compiling in support for SSL

and in the Makefiles I have:

LIBS = -lintl -ldl -lrt  /usr/local/lib/libssl.so /usr/local/lib/libcrypto.so
-Wl,-rpath -Wl,/usr/local/lib

With wget-1.11-beta-1 however I get the configure output:

checking how to link with libssl... -lssl -lcrypto
configure: compiling in support for SSL via OpenSSL

and

LIBS = -lintl -ldl -lrt  -lssl -lcrypto

Somehow the specified directory /usr/local seems to be ignored  ;-)
I *have* a SSL under /usr from the base system installation, but the current and
correctly configured version that I actually use is in /usr/local.

J.Roderburg



Re: wget 1.11 alpha1 [Fwd: Bug#378691: wget --continue doesn't workwith HTTP]

2006-08-27 Thread Jochen Roderburg
Zitat von Mauro Tortonesi <[EMAIL PROTECTED]>:

> >
> > The timestamping issues I reported in above mentioned message are now also
> > repaired by the patch you mailed last week here.
> > Only the small *cosmetic* issue remains that it *always* says:
> >Remote file is newer, retrieving.
> > even if there is no local file yet.
>

> i have been working on the problem you reported for the last couple of days.
> i've just committed a patch that should fix it for good. could you please try
> the new HTTP code and tell me if it works properly?
>

Hi Mauro,

I have now tested the new wget 1.11 beta1 on my Linux system and the above issue
is solved now. The "Remote file is newer" message now only appears when the
local file exists and most of the other logic with time-stamping and
file-naming works like expected.

I meanwhile found, however, another new problem with time-stamping, which mainly
occurs in connection with a proxy-cache, I will report that in a new thread.
Same for a small problem with the SSL configuration.

Thanks for the continuing work on my most-used utility  ;-)

J.Roderburg