Hi,

done.
When the API returns an Error like "apikey false..." the Header sents 
now an "400 Bad Request".


--
best regards
Martin
www.blocklist.de Fail2Ban Reporting Service
Web:   https://www.blocklist.de
Mail:  support@blocklist.de
Forum: https://forum.blocklist.de

Am 06.12.2013 00:47, schrieb Steven Hiscocks:
>> +#
>> +actionstop =
>> +
>> +# Option:  actioncheck
>> +# Notes.:  command executed once before each actionban command
>> +# Values:  CMD
>> +#
>> +actioncheck =
>> +
>> +# Option:  actionban
>> +# Notes.:  command executed when banning an IP. Take care that the
>> +#          command is executed with Fail2Ban user rights.
>> +# Tags:    See jail.conf(5) man page
>> +# Values:  CMD
>> +#
>> +actionban = ! curl --data-urlencode 'server=<email>' --data 'apikey=<apikey>' --data 'service=<service>' --data 'ip=<ip>' --data-urlencode 'logs=<matches>' --data 'format=text' --user-agent "`fail2ban-client --version | head -1`" "https://www.blocklist.de/en/httpreports.html" | grep "status: error"
>
> Good idea on using `--fail` @grooverdan
>
> The blocklist.de returns a text with "status: success" or "status: error", but always code _200_.  My inverse on the return was such that the "error" could be matched so it would be logged.
>
> @blocklist Could the blocklist.de API be changed to returned a [HTTP 4xx status](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error) along with an error?
>
> I'd agree that having a version substitution would be cleaner for _0.9_
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/fail2ban/fail2ban/pull/477/files#r8149549
>