gxthrj opened a new issue #5908: URL: https://github.com/apache/apisix/issues/5908
### Issue description To determine that a header does not exist, you need to use `null`, it works like: ``` curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "uri": "/ip", "upstream": { "type": "roundrobin", "nodes": { "httpbin.org": 1 } }, "vars": [["http_hello", "==", null]] }' ``` But using nil will not work, it will report an error: ``` curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "uri": "/ip", "upstream": { "type": "roundrobin", "nodes": { "httpbin.org": 1 } }, "vars": [["http_hello", "==", nil]] }' ``` errors:{"req_body":"\n{\n \"uri\": \"\/ip\",\n \"upstream\": {\n \"type\": \"roundrobin\",\n \"nodes\": {\n \"httpbin.org\": 1\n }\n },\n \"vars\": [[\"http_hello\", \"==\", nil]]\n}","error_msg":"invalid request body: Expected value but found invalid token at character 169"} ### Environment - apisix version (cmd: `apisix version`): 2.10 - OS (cmd: `uname -a`): centos7 - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): - apisix-dashboard version, if have: - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner): - luarocks version, if the issue is about installation (cmd: `luarocks --version`): -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
