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

Entry_point endpoint returns wrong content type #4269

Closed
enykeev opened this issue Jul 25, 2018 · 0 comments
Closed

Entry_point endpoint returns wrong content type #4269

enykeev opened this issue Jul 25, 2018 · 0 comments
Assignees
Milestone

Comments

@enykeev
Copy link
Member

enykeev commented Jul 25, 2018

SUMMARY

/action/views/entry_point endpoint returns wrong content-type

ISSUE TYPE
  • Bug Report
STACKSTORM VERSION

root@c4651da9d7f6:/# st2 --version
st2 2.8.0, on Python 2.7.6

OS / ENVIRONMENT / INSTALL METHOD

st2-docker

STEPS TO REPRODUCE
root@c4651da9d7f6:/# curl -i https://localhost/api/v1/actions/views/entry_point/packs.install?x-auth-token="$(st2 auth -t st2admin)" --insecure
Password:
HTTP/1.1 200 OK
Server: nginx/1.15.1
Date: Wed, 25 Jul 2018 10:25:19 GMT
Content-Type: application/json
Content-Length: 892
Connection: keep-alive
Set-Cookie: auth-token=101c5e42dab546acae255e05277fd243; Max-Age=86399; Path=/; expires=Thu, 26-Jul-2018 10:25:18 GMT; HttpOnly
Access-Control-Allow-Origin: http://127.0.0.1:3000
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
Access-Control-Allow-Headers: Content-Type,Authorization,X-Auth-Token,St2-Api-Key,X-Request-ID
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Type,X-Limit,X-Total-Count,X-Request-ID
X-Request-ID: 8dc394fb-7753-4ffb-91aa-089a3abd0ee8
Front-End-Https: on
X-Content-Type-Options: nosniff

"---\n  chain:\n    -\n      name: \"download pack\"\n      ref: \"packs.download\"\n      parameters:\n        packs: \"{{packs}}\"\n        force: \"{{force}}\"\n      on-success: \"make a prerun\"\n    -\n      name: \"make a prerun\"\n      ref: \"packs.virtualenv_prerun\"\n      parameters:\n        packs_status: \"{{ __results['download pack'].result }}\"\n      on-success: \"install pack dependencies\"\n    -\n      name: \"install pack dependencies\"\n      ref: \"packs.setup_virtualenv
EXPECTED RESULTS

The endpoint should respect content MIME type and request Accept header. Content-Type: application/json should be Content-Type: application/x-yaml, text/yaml or text/plain depending on request's Accept header. See https://tools.ietf.org/html/rfc7231#section-5.3.2 for details.

ACTUAL RESULTS

The endpoint always return Content-Type: application/json no matter what MIME type the particular content has.

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

2 participants