Re: Different exit status for 404 error?

2007-09-13 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Alex Owen wrote:
 Hello,
 
 If i run :
 wget http://server.domain/file
 
 How can I differentiate between a network problem that made wget fail
 of the server sending back a HTTP 404 error?
 
 ( I have a use case described in debian bug  http://bugs.debian.org/422088 )
 
 I think it would be nice if the exit code of wget could be inspected
 to determin if wget failed because of a 404 error or some other
 reason.

Hi Alex,

We do plan to look evaluate differentiation of exit statuses at some
point in the future; however, it's not one of our very highest
priorities for the moment, and it's currently targeted for Wget 1.13
(the bug report is at https://savannah.gnu.org/bugs/index.php?20333, but
there's really not much description there). We are about to release Wget
1.11, hopefully within a month.

It is possible that this item will be targeted for a sooner release, in
Wget 1.12; mostly it just needs a final agreement on how exit codes
should be divided, which means discussion. Actual implementation will be
trivial. But, in the meantime, I'm not sure I want to introduce
different exit codes on an individual basis.

- --
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

iD8DBQFG6aGF7M8hyUobTrERCO03AJ9FllUtvfZf3+aUX0a+PP1h5EBILgCdEwj8
yDjpiVmkBf/3OQ2IRSILCTs=
=BVBE
-END PGP SIGNATURE-


Re: Different exit status for 404 error?

2007-09-13 Thread Alex Owen
On 13/09/2007, Micah Cowan [EMAIL PROTECTED] wrote:

 Alex Owen wrote:
 
  I think it would be nice if the exit code of wget could be inspected
  to determin if wget failed because of a 404 error or some other
  reason.

 Hi Alex,

 We do plan to look evaluate differentiation of exit statuses at some
 point in the future;

Hi Micah,
Thanks for your prompt reply!
Glad it is on the ToDo list even if a low priotity.

 it just needs a final agreement on how exit codes
 should be divided, which means discussion. Actual implementation will be
 trivial. But, in the meantime, I'm not sure I want to introduce
 different exit codes on an individual basis.

Fair comment!

For my Debian usage case we would in fact want to use busybox
wget... however we would want to keep that compatible with GNU-wget
for obvious reasons.
So thanks for the bug pointer... I will track that to see how the
final agreement on how exit codes should be divided works out then I
help patch busybox wget to match your spec!


Regards
Alex Owen