tag 645763 + confirmed retitle 645763 bti: no errors when server response is not valid thanks
On Tue, 18 Oct 2011 15:06:12 +0200, Vincent Lefevre wrote: > ypig:~> bti --config .bti-identica --host identica --action friends > ypig:~> > > This is because identica is down, but there should have been an error > message and the exit code should have been non-zero. > > The --debug option gives more information: > > ypig:~> bti --debug --config .bti-identica --host identica --action friends > bti: main: configfile = .bti-identica > bti: main: host = 1 > bti: main: action = 1 > bti: session_readline_init: Using libreadline.so.6 for readline library > bti - version 031 > bti: main: config file = .bti-identica > bti: main: host = 1 > bti: main: action = 1 > bti: send_request: https://identi.ca/api/statuses/friends_timeline.xml?page=1 > bti: send_request: > https://identi.ca/api/statuses/friends_timeline.xml?oauth_consumer_key=xxx&oauth_nonce=xxx&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1318942941&oauth_token=xxx&oauth_version=1.0&page=1&oauth_signature=%2Fxxx%2Bc%3D > bti: send_request: <html><head><title>service > unavailable</title></head><body><h1>service unavailable</h1><p>StatusNet > cloud sites, including Identi.ca, are under maintenance. See <a > href="http://status.net/2011/10/18/identi-ca-and-other-sites-down">status > blog post</a> for details and updates.</p></body> > ypig:~> Yup, that's not optimal. Testing with identi.ca is a bit difficult now since it's working again :) But I can reproduce the problem (no output and exit value 0) by setting host to any random web server, and it's the same with basic auth and oauth. The behaviour also doesn't depend on the HTTP response code (i.e. both with 200 and with 403 or 404). I guess error handling should cover both - 4* and 5* HTTP response codes - unparsable responses like in your example Will discuss with upstream. Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key ID: 0x8649AA06 : :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe `- NP: Pink Floyd: Learning to Fly
signature.asc
Description: Digital signature