-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Jochen Roderburg wrote:
> And now, for a change, a case, that works now (better) ;-)
>
> This is an example where a HEAD request gets a 500 Error response.
>
> Wget default options again, but contentdisposition=yes to "force" a HEAD.
>
>
> wget.111-svn-0709 --debug -e "contentdisposition = yes"
> http://www.eudora.com/cgi-bin/export.cgi?productid=EUDORA_win_7109
>
> Setting contentdisposition (contentdisposition) to yes
> DEBUG output created by Wget 1.10+devel on linux-gnu.
>
> --15:26:54--
> http://www.eudora.com/cgi-bin/export.cgi?productid=EUDORA_win_7109
> Resolving www.eudora.com... 199.106.114.30
> Caching www.eudora.com => 199.106.114.30
> Connecting to www.eudora.com|199.106.114.30|:80... connected.
> Created socket 3.
> Releasing 0x080888d8 (new refcount 1).
>
> ---request begin---
> HEAD /cgi-bin/export.cgi?productid=EUDORA_win_7109 HTTP/1.0
> User-Agent: Wget/1.10+devel
> Accept: */*
> Host: www.eudora.com
> Connection: Keep-Alive
>
> ---request end---
> HTTP request sent, awaiting response...
> ---response begin---
> HTTP/1.1 500 Server Error
> Server: Netscape-Enterprise/6.0
> Date: Mon, 03 Sep 2007 13:26:54 GMT
> Content-length: 305
> Content-type: text/html
> Connection: keep-alive
>
> ---response end---
> 500 Server Error
> Registered socket 3 for persistent reuse.
> --15:26:56-- (try: 2)
> http://www.eudora.com/cgi-bin/export.cgi?productid=EUDORA_win_7109
> Disabling further reuse of socket 3.
> Closed fd 3
> Found www.eudora.com in host_name_addresses_map (0x80888d8)
> Connecting to www.eudora.com|199.106.114.30|:80... connected.
> Created socket 3.
> Releasing 0x080888d8 (new refcount 1).
>
> ---request begin---
> GET /cgi-bin/export.cgi?productid=EUDORA_win_7109 HTTP/1.0
> User-Agent: Wget/1.10+devel
> Accept: */*
> Host: www.eudora.com
> Connection: Keep-Alive
>
> ---request end---
> HTTP request sent, awaiting response...
> ---response begin---
> HTTP/1.1 302 Moved Temporarily
> Server: Netscape-Enterprise/6.0
> Date: Mon, 03 Sep 2007 13:26:55 GMT
> Location: http://www.eudora.com/download/eudora/windows/7.1/Eudora_7.1.0.9.exe
> Content-length: 0
> Connection: keep-alive
>
> ---response end---
> 302 Moved Temporarily
> Registered socket 3 for persistent reuse.
> Location: http://www.eudora.com/download/eudora/windows/7.1/Eudora_7.1.0.9.exe
> [following]
> Skipping 0 bytes of body: [] done.
> --15:26:56--
> http://www.eudora.com/download/eudora/windows/7.1/Eudora_7.1.0.9.exe
> Reusing existing connection to www.eudora.com:80.
> Reusing fd 3.
>
> ---request begin---
> HEAD /download/eudora/windows/7.1/Eudora_7.1.0.9.exe HTTP/1.0
> User-Agent: Wget/1.10+devel
> Accept: */*
> Host: www.eudora.com
> Connection: Keep-Alive
>
> ---request end---
> HTTP request sent, awaiting response...
> ---response begin---
> HTTP/1.1 200 OK
> Server: Netscape-Enterprise/6.0
> Date: Mon, 03 Sep 2007 13:26:56 GMT
> Content-type: application/octet-stream
> Last-modified: Thu, 05 Oct 2006 18:45:18 GMT
> Content-length: 17416184
> Accept-ranges: bytes
> Connection: keep-alive
>
> ---response end---
> 200 OK
> Length: 17416184 (17M) [application/octet-stream]
> --15:26:56--
> http://www.eudora.com/download/eudora/windows/7.1/Eudora_7.1.0.9.exe
> Reusing existing connection to www.eudora.com:80.
> Reusing fd 3.
>
> ---request begin---
> GET /download/eudora/windows/7.1/Eudora_7.1.0.9.exe HTTP/1.0
> User-Agent: Wget/1.10+devel
> Accept: */*
> Host: www.eudora.com
> Connection: Keep-Alive
>
> ---request end---
> HTTP request sent, awaiting response...
> ---response begin---
> HTTP/1.1 200 OK
> Server: Netscape-Enterprise/6.0
> Date: Mon, 03 Sep 2007 13:26:56 GMT
> Content-type: application/octet-stream
> Last-modified: Thu, 05 Oct 2006 18:45:18 GMT
> Content-length: 17416184
> Accept-ranges: bytes
> Connection: keep-alive
>
> ---response end---
> 200 OK
> Length: 17416184 (17M) [application/octet-stream]
> Saving to: `Eudora_7.1.0.9.exe'
>
> 100%[=================================================>] 17,416,184 397K/s
> in 44s
>
> 15:27:40 (386 KB/s) - `Eudora_7.1.0.9.exe' saved [17416184/17416184]
>
>
> ls -l Eudora_7.1.0.9.exe
> -rw-r----- 1 a0045 RRZK 17416184 05.10.2006 20:45 Eudora_7.1.0.9.exe
>
>
> This seems also to use the only available source for the timestamp, the
> response
> to the GET request.
Sorry to reproduce that in full, but I thought it might be helpful to
see the full transcript again, since you sent this a while ago.
I was going back through this thread to refresh my memory on some
things. I noticed, and wanted to point out, that actually, the GET
request was _not_ the only available source for the timestamp; HEAD was
answered with a 500, but only the first one. The HEAD issued after the
redirect gives a timestamp.
The problem you pointed out that causes the failure to properly
timestamp when HEADs aren't issued seems, to my reading, to be simply
regressable for the fix. Mauro's fixes don't look as if they depend upon
that line being there, but I'm waiting for him to have a chance to look
over it before I commit to that as the fix (both he and I have been busy
lately).
Here's the code in question again, for reference:
> This (new) piece of code in http.c (line 2666 ff.) looks very suspicious to
> me,
> especially the "time_came_from_head" bit:
>
> /* Reparse time header, in case it's changed. */
> if (time_came_from_head
> && hstat.remote_time && hstat.remote_time[0])
> {
> newtmr = http_atotm (hstat.remote_time);
> if (newtmr != -1)
> tmr = newtmr;
> }
I've also got trying to deal with content-disposition issues for when
HEAD fails, on my todo list.
- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHAHk77M8hyUobTrERCNZSAJ9P9J5fAR022eCWdbye2pfB3+D+YwCfcx8N
61bzBYUSzal08ZqEmG7kxrc=
=rdq5
-----END PGP SIGNATURE-----