[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] v 1.15 --content-on-error with http response 401

From: Hubert Tarasiuk
Subject: Re: [Bug-wget] v 1.15 --content-on-error with http response 401
Date: Wed, 22 Apr 2015 19:16:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

To keep that body, we'd have to define what happens if the authorization
that follows proves to be successful.

I have prepared a simple workaround patch and the current behavior would
be to save the "error" body as eg. index.html and then to append ".1" to
the file name if the authorization happens. (As is usually done when the
file exists.) Perhaps we would rather like to overwrite the
unauthorized-body if the authorization succeeds.

And by the way I am thinking of a refactorization in gethttp/http_loop;
so that gethttp returns to http_loop on auth error. So that
HTTP_STATUS_UNAUTHORIZED is no longer a special case. (Then, in
particular, the code duplication for file write could be avoided.)
But it seems to be a little bit more of hacking.

W dniu 20.04.2015 o 17:29, Stefan Heid pisze:
> Dear GNU-Team,
> wget seems not to download the Http-body on a 401 error. The
> Webdeveloper-tools of firefox show clearly that there is a body on the
> response.
> wget --content-on-error
> https://koala.uni-paderborn.de/signin/semester/SS15/355827044861529/units/
> The Content-on-error option makes no difference at all.
> Greetings Stefan

Attachment: 0001-Handle-content-on-error-on-http-authorization.patch
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]