wget bug?

2007-07-08 Thread Nikolaus_Hermanspahn
wget under win2000/win XP
I get "No such file or directory" error messages when using the follwing 
command line.

wget -s --save-headers 
"http://www.nndc.bnl.gov/ensdf/browseds.jsp?nuc=%1&class=Arc";

%1 = 212BI
Any ideas?

thank you

Dr Nikolaus Hermanspahn
Advisor (Science)
National Radiation Laboratory
Ministry of Health
DDI: +64 3 366 5059
Fax: +64 3 366 1156

http://www.nrl.moh.govt.nz
mailto:[EMAIL PROTECTED]




Statement of confidentiality: This e-mail message and any accompanying
attachments may contain information that is IN-CONFIDENCE and subject to
legal privilege.
If you are not the intended recipient, do not read, use, disseminate,
distribute or copy this message or attachments.
If you have received this message in error, please notify the sender
immediately and delete this message.


*
This e-mail message has been scanned for Viruses and Content and cleared 
by the Ministry of Health's Content and Virus Filtering Gateway
*


Re: fix: don't send HEAD if -O is given

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

> On Sun, 08 Jul 2007 16:22:59 +0200
> Jochen Roderburg <[EMAIL PROTECTED]> wrote:
>
> > I think I remember now the motivation for this "unnecessary" HEAD request.
> > It *is* necessary as part of the support for getting the filename from the
> > "Content-Disposition" header. To know with which local file to compare you
> have
> > to get the headers from the server.
>
> yes, support for Content-Disposition HTTP header was the reason for which i
> had to change wget's behaviour to send a HEAD HTTP request before the actual
> file retrieval. so, one can't claim that the preliminary HEAD request is
> "unnecessary". however, it can (and should in fact be) skipped if -O or
> --no-content-disposition are given.

Yes, that is what I also wanted to express: I thought first it was unnecessary
but now I understand it is only so in certain more specialized cases. Thank you
for more info, slowly I begin to get the "whole picture", and see why my old
report was answered by you with a patch which at first glance looked like it
solved a different problem  ;-)

> > So I think the erroneous patch can simply be retracted. I don't know if
> there
> > was any other additional issue with the "-O" option. In older versions
> there
> > was the case, that with -O wget still looked at local files of the same
> name
> > than the remote file, but I think this does not happen anymore because it
> > already does no longer allow -O and timestamping together.
>
> no, as i mentioned above, we should avoid sending HEAD if -O or
> --no-content-disposition are given. therefore, we can't simply get rid of the
> changes introduced by the buggy patch i submitted, but we need to fix and
> keep them.
>
> anyway, thank you very much for your bugreport. i just fixed the problem with
> my buggy patch in my local repository. i will clean up the changes and commit
> them tomorrow at most.

I'll keep an eye on it.
Somehow now I think that is wasn't so bad at all that the first attempt with the
patch did not succeed. If it would have done what it should I think now I would
have understood even less what it had to do with my case  ;-)

> > The remaining "real" bug is that the timestamp for the local file is taken
> from
> > the HEAD request and not from the GET request. Details for that are in the
> list
> > archive in http://www.mail-archive.com/wget@sunsite.dk/msg09303.html
>
> i am working on this issue as well.

Fine, this one really concerns me more. It has always been a very important
feature for me that wget sets the timestamp on the downloaded files to the
timestamp of the server files, and it is really confusing when this doesn't
work  like expected in some cases.

Best regards,
J.Roderburg





Fwd: Re: fix: don't send HEAD if -O is given

2007-07-08 Thread Jochen Roderburg

Still trying to keep the list informed about the progress in this case ;-)

- Weitergeleitete Nachricht von Mauro Tortonesi <[EMAIL PROTECTED]>
-
Datum: Sun, 8 Jul 2007 17:29:15 +0200
Von: Mauro Tortonesi <[EMAIL PROTECTED]>
Antwort an: Mauro Tortonesi <[EMAIL PROTECTED]>
 Betreff: Re: fix: don't send HEAD if -O is given
  An: Jochen Roderburg <[EMAIL PROTECTED]>

On Sun, 08 Jul 2007 16:22:59 +0200
Jochen Roderburg <[EMAIL PROTECTED]> wrote:

> Zitat von Jochen Roderburg <[EMAIL PROTECTED]>:
>
> > So the little difference was that this version did a (IMHO) unnecessary HEAD
> > request in the case timestamping and no local file present. Not a big
problem
> > as such, but a side effect was that it created more cases for the other
> > timestamp bug that I reported (timestamp for the local file is taken from
the
> > HEAD request and not from the GET request).
>
> I think I remember now the motivation for this "unnecessary" HEAD request.
> It *is* necessary as part of the support for getting the filename from the
> "Content-Disposition" header. To know with which local file to compare you
have
> to get the headers from the server.

yes, support for Content-Disposition HTTP header was the reason for which i had
to change wget's behaviour to send a HEAD HTTP request before the actual file
retrieval. so, one can't claim that the preliminary HEAD request is
"unnecessary". however, it can (and should in fact be) skipped if -O or
--no-content-disposition are given.


> So I think the erroneous patch can simply be retracted. I don't know if there
> was any other additional issue with the "-O" option. In older versions there
> was the case, that with -O wget still looked at local files of the same name
> than the remote file, but I think this does not happen anymore because it
> already does no longer allow -O and timestamping together.

no, as i mentioned above, we should avoid sending HEAD if -O or
--no-content-disposition are given. therefore, we can't simply get rid of the
changes introduced by the buggy patch i submitted, but we need to fix and keep
them.

anyway, thank you very much for your bugreport. i just fixed the problem with my
buggy patch in my local repository. i will clean up the changes and commit them
tomorrow at most.


> The remaining "real" bug is that the timestamp for the local file is taken
from
> the HEAD request and not from the GET request. Details for that are in the
list
> archive in http://www.mail-archive.com/wget@sunsite.dk/msg09303.html

i am working on this issue as well.


-- 
Mauro Tortonesi <[EMAIL PROTECTED]>

- Ende der weitergeleiteten Nachricht -





Fwd: Re: fix: don't send HEAD if -O is given

2007-07-08 Thread Jochen Roderburg

Separately resent to the list because of mistyped address  ;-)

- Weitergeleitete Nachricht von Jochen Roderburg <[EMAIL PROTECTED]>
-
Datum: Sun, 08 Jul 2007 16:22:59 +0200
Von: Jochen Roderburg <[EMAIL PROTECTED]>
Antwort an: Jochen Roderburg <[EMAIL PROTECTED]>
 Betreff: Re: fix: don't send HEAD if -O is given
  An: Jochen Roderburg <[EMAIL PROTECTED]>

Zitat von Jochen Roderburg <[EMAIL PROTECTED]>:

> So the little difference was that this version did a (IMHO) unnecessary HEAD
> request in the case timestamping and no local file present. Not a big problem
> as such, but a side effect was that it created more cases for the other
> timestamp bug that I reported (timestamp for the local file is taken from the
> HEAD request and not from the GET request).

I think I remember now the motivation for this "unnecessary" HEAD request.
It *is* necessary as part of the support for getting the filename from the
"Content-Disposition" header. To know with which local file to compare you have
to get the headers from the server.
So I think the erroneous patch can simply be retracted. I don't know if there
was any other additional issue with the "-O" option. In older versions there
was the case, that with -O wget still looked at local files of the same name
than the remote file, but I think this does not happen anymore because it
already does no longer allow -O and timestamping together.


The remaining "real" bug is that the timestamp for the local file is taken from
the HEAD request and not from the GET request. Details for that are in the list
archive in http://www.mail-archive.com/wget@sunsite.dk/msg09303.html


Best regards,

Jochen Roderburg
ZAIK/RRZK
University of Cologne
Robert-Koch-Str. 10Tel.:   +49-221/478-7024
D-50931 Koeln  E-Mail: [EMAIL PROTECTED]
Germany




- Ende der weitergeleiteten Nachricht -





Fwd: Re: fix: don't send HEAD if -O is given

2007-07-08 Thread Jochen Roderburg

Separately resent to the list because of mistyped address  ;-)

- Weitergeleitete Nachricht von Jochen Roderburg <[EMAIL PROTECTED]>
-
Datum: Sun, 08 Jul 2007 14:11:24 +0200
Von: Jochen Roderburg <[EMAIL PROTECTED]>
Antwort an: Jochen Roderburg <[EMAIL PROTECTED]>
 Betreff: Re: fix: don't send HEAD if -O is given
  An: Mauro Tortonesi <[EMAIL PROTECTED]>

Zitat von Mauro Tortonesi <[EMAIL PROTECTED]>:

> i've just committed to the trunk the patch included in attachment, which
> fixes bug #20323:
>
> https://savannah.gnu.org/bugs/?20323
>
> reported by Jochen Roderburg:
>
> http://www.mail-archive.com/wget@sunsite.dk/msg09312.html
>
> here is the ChangeLog:
>
> 2007-07-04  Mauro Tortonesi  <[EMAIL PROTECTED]>
>
>* http.c: Skip HEAD request and start immediately with GET if -O is
>given.
>
> --
> Mauro Tortonesi <[EMAIL PROTECTED]>
>
>

Hello Mauro & Micah,

Sorry to report that this patch does not fix the bug, but instead creates new
worse bugs.

I was already a little puzzled about the title of the fix because my original
error report had nothing specifically to do with the "-O" case. I very rarely
use this option, but I know from numerous discussions here on the list that it
does something different than most people naively understand.


To sum my case up again about the usage of HEAD in the normal mode (no -O):

wget upto 1.10.2

no timestamping, no local file   no HEAD
no timestamping,local file   no HEAD
   timestamping, no local file   no HEAD
   timestamping,local file  HEAD

wget 1.11  svn 04/2007

no timestamping, no local file   no HEAD
no timestamping,local file   no HEAD
   timestamping, no local file  HEAD
   timestamping,local file  HEAD

So the little difference was that this version did a (IMHO) unnecessary HEAD
request in the case timestamping and no local file present. Not a big problem
as such, but a side effect was that it created more cases for the other
timestamp bug that I reported (timestamp for the local file is taken from the
HEAD request and not from the GET request).

Now after the new patch we have:

wget 1.11  svn 07/2007

no timestamping, no local file  HEAD, no file tranferred
no timestamping,local file  HEAD, no file tranferred
   timestamping, no local file  HEAD, no file tranferred
   timestamping,local file  HEAD, no file tranferred

Now it does the HEAD request really "always", and the file transfer is totally
broken (someone else has already reported that).

In this state I did not make any further tests with the -O variants.

Best regards,

Jochen Roderburg
ZAIK/RRZK
University of Cologne
Robert-Koch-Str. 10Tel.:   +49-221/478-7024
D-50931 Koeln  E-Mail: [EMAIL PROTECTED]
Germany

- Ende der weitergeleiteten Nachricht -