On Fri, Jul 11, 2008 at 4:01 PM, Alex Owen <[EMAIL PROTECTED]> wrote:
> 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

Trying to reproduce:

# ./busybox wget http://space.com/bogon
Connecting to space.com (209.73.219.100:80)
wget: server returned error: HTTP/1.1 404 Not Found

Looks good to me: the user is given full, unabridged server response.

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

You should try latest released version prior to reporting a bug.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to