Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stderr output of ShellTask is base64 encoded #9

Open
peejaychilds opened this issue Mar 9, 2017 · 0 comments
Open

stderr output of ShellTask is base64 encoded #9

peejaychilds opened this issue Mar 9, 2017 · 0 comments

Comments

@peejaychilds
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant