[Top][All Lists]

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

Re: [Bug-wget] Conditional GET requests

From: Hubert Tarasiuk
Subject: Re: [Bug-wget] Conditional GET requests
Date: Thu, 14 May 2015 15:35:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

W dniu 13.05.2015 o 10:24, Tim Ruehsen pisze:
> Hi Hubert,
> nice to see your work... it looks very good to me.
> Just from a quick first glimpse, there are a few small points:
> - please avoid abort() (found in time_to_rfc1123()). The function returns 
> RETROK on success but calls abort() on failure. This might end up in a 
> frustrating user experience. On error, you could fall back to not using if-
> modified-since at all, fall back to using HEAD or fall back to use a time 
> value of 0 (corresponding to 1.1.1970 00:00:00). Or whatever you think is 
> appropriate.
We could do that but I am not sure that it would be good solution. Are
there any cases when gmtime would have a good reason to fail?
I think that when a function like gmtime fails, it could mean that
something is seriously wrong; and perhaps we should not do anything but
crash in that case (just as we do in case of xmalloc, for example).
What do you think?

> - typo in Test-condget.py (usiong instead using) - have a look if your 
> IDE/editor supports spell checking.
> - it would be nice if your test case tests all variants of HTTP-date (= 
> rfc1123-date | rfc850-date | asctime-date)
Do you mean to test the conversion Wget -> HTTP or HTTP -> Wget?
In the former: Wget will currently issue dates exclusively in rfc1123
In the latter: I agree that it should be tested (although the function
that handles this conversion is not part of these patches, it had
already been present in http.c (http_atotm)). Especially that the tests
for "-N" do not test formats other than rfc1123, either (as far as I can

Thank you for the suggestions.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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