wget error message parsing.
Alex Owen
r.alex.owen at gmail.com
Fri Jul 11 14:01:30 UTC 2008
Hello,
I notice that at SVN commit 16528 wget lost the feature where it
returned the error status number:
http://busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/networking/wget.c?rev=16528&r1=16463&r2=16528
This is a real shame as I like to parse the output to see if there has
been a HTTP 404 error and react accordingly.
Before revision 16528 I could look for error messages that looked like:
server returned error 404: SERVER_DEPENDENT_STRING
Now I get
server returned error: SERVER_DEPENDENT_STRING
Please can the error number (status code) be re-incuded into the error output???
Changing the line
bb_error_msg_and_die("server returned error: %s", buf);
to:
bb_error_msg_and_die("server returned error %s: %s", s, buf);
or to:
bb_error_msg_and_die("server returned error %d: %s", status, buf);
Would do the trick!
If this is not acceptable please could you tell me why?
Many thanks for a great piece of software.
Alex Owen
More information about the busybox
mailing list