Using the following configuration
{
"host": "127.0.0.1",
"port": 9900,
"reload_env": true,
"endpoints": [
{
"path": "/test",
"methods": {
"GET": {
"type": "shell",
"config": {
"shell": "/bin/bash",
"commands": [
{
"command": "./error.sh",
"format": "json"
}
]
}
}
}
}
]
}
and the following test script
#!/bin/sh
echo 'some error response' 1>&2
exit 1
I see the output of stderr is base64 encoded.
Is this expected?
[vagrant@localhost ~]$ ./goexpose-linux-amd64-1.0.0 --config test.json &
[1] 28404
[vagrant@localhost ~]$ curl http://localhost:9900/test
{"message":"OK","result":[{"error":{"Stderr":"c29tZSBlcnJvciByZXNwb25zZQo="},"message":"OK"}],"status":200}
[vagrant@localhost ~]$ echo c29tZSBlcnJvciByZXNwb25zZQo= | base64 --decode
some error response
Using the following configuration
{ "host": "127.0.0.1", "port": 9900, "reload_env": true, "endpoints": [ { "path": "/test", "methods": { "GET": { "type": "shell", "config": { "shell": "/bin/bash", "commands": [ { "command": "./error.sh", "format": "json" } ] } } } } ] }and the following test script
I see the output of stderr is base64 encoded.
Is this expected?