haproxy httpchk de JSON-RPC

J'ai besoin de vérifier le backend avec la demande POST JSON-RPC. J'ai tout essayé, cela ne fonctionne pas, le backend ne démonte pas le corps. Il y a des idées ce que je fais mal?

curl -vX POST [url=http://localhost:5555]http://localhost:5555[/url] --data '{"jsonrpc":"2.0", "method":"xxx", "params":[],"id":1}'
* Connected to localhost (127.0.0.1) port 5555 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.37.1
> Host: localhost:5555
> Accept: */*
> Content-Length: 53
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 63 out of 63 bytes
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Sat, 22 Aug 2015 15:28:33 GMT
< Content-Length: 39
<
{"id":1,"jsonrpc":"2.0","result":true}

J'ai essayé cette configuration:

option httpchk POST / HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length: 53\r\n\r\n{"jsonrpc":"2.0", "method":"xxx", "params":[],"id":1}
Invité:

Alice

Confirmation de:

Vous aurez probablement besoin de boucler correctement la chaîne utilisée pour vérifier.

Vous avez

option httpchk POST / HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length: 53\r\n\r\n{"jsonrpc":"2.0", "method":"xxx", "params":[],"id":1}

Bien que je pense que cela peut mieux fonctionner

option httpchk POST / HTTP/1.1\r\nContent-Type:\ application/json\r\nContent-Length:\ 53\r\n\r\n{"jsonrpc":"2.0","method":"xxx","params":[],"id":1}

Différence - Ceci est une fonctionnalité manquante après

:

pour les deux

Content-Type

et

Content-Length

En-têtes et enlèvement de tous les espaces dans "Télé" JSON.

Je ne l'ai pas testé, mais je ne comprends pas pourquoi cela ne fonctionne pas.

Pour répondre aux questions, connectez-vous ou registre