[Pdns-users] API issue. 400 Bad Request

Christian Hofstaedtler christian.hofstaedtler at deduktiva.com
Thu Mar 5 12:23:04 UTC 2015


Hi,

> On 05 Mar 2015, at 13:16, kometch <kometch at gmail.com> wrote:
[..]
> I have used to compile the PowerDNS recursor 3.7.1 on an ARM board from a source that Cubietruck.

[..]

> $ curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8082/servers/localhost | jq .
> * Hostname was NOT found in DNS cache
> *   Trying 127.0.0.1...
>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                 Dload  Upload   Total   Spent    Left  Speed
>  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 127.0.0.1 (127.0.0.1) port 8082 (#0)
>> GET /servers/localhost HTTP/1.1
>> User-Agent: curl/7.35.0
>> Host: 127.0.0.1:8082
>> Accept: */*
>> X-API-Key: changeme
>> 
> < HTTP/1.1 400 Bad Request
> < Content-Type: 11
> * no chunk, no close, no size. Assume close to signal end
> <
> { [data not shown]
> 100    11    0    11    0     0    976      0 --:--:-- --:--:-- --:--:--  1100
> * Closing connection 0
> parse error: Invalid numeric literal at line 1, column 4

In some versions, '400 Bad Request’ may also happen because of wrong authentication (i.e. wrong X-API-Key). Please double check the API Key.

OTOH, I’m not sure anybody ever tested API on ARM, so maybe you found a bug.

Best,
Christian



-- 
Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien)
www.deduktiva.com / +43 1 353 1707





More information about the Pdns-users mailing list