[ https://issues.apache.org/jira/browse/LIVY-525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcelo Vanzin reassigned LIVY-525: ----------------------------------- Assignee: Ingo Schuster > Response Content-Type is application/json, but a simple string gets returned > ---------------------------------------------------------------------------- > > Key: LIVY-525 > URL: https://issues.apache.org/jira/browse/LIVY-525 > Project: Livy > Issue Type: Bug > Components: Server > Affects Versions: 0.5.0 > Reporter: Ingo Schuster > Assignee: Ingo Schuster > Priority: Minor > Fix For: 0.6.0 > > > When trying to execute a script that is not whitlisted, the error response > has content type application/json, but the content is in fact just a plain > string: > {{$> curl -v -X POST --data '\{"file": "/root/NoAccess.R"}' -H "Content-Type: > application/json" <SERVER>:8998/batches}} > {{Note: Unnecessary use of -X or --request, POST is already inferred.}} > {{* Trying <IP ADDRESS>...}} > {{* TCP_NODELAY set}} > {{* Connected to <SERVER> (<IP ADDRESS>) port 8998 (#0)}} > {{> POST /batches HTTP/1.1}} > {{> Host: <SERVER>:8998}} > {{> User-Agent: curl/7.55.1}} > {{> Accept: */*}} > {{> Content-Type: application/json}} > {{> Content-Length: 28}} > {{> }} > {{* upload completely sent off: 28 out of 28 bytes}} > {{< HTTP/1.1 400 Bad Request}} > {{< Date: Tue, 09 Oct 2018 08:20:12 GMT}} > {{< Content-Type: application/json; charset=UTF-8}} > {{< Content-Length: 83}} > {{< Server: Jetty(9.2.16.v20160414)}} > {{< }} > {{* Connection #0 to host <SERVER> left intact}} > {{"requirement failed: Local path /root/NoAccess.R cannot be added to user > sessions."}} > > [https://github.com/apache/incubator-livy/blob/master/server/src/main/scala/org/apache/livy/sessions/Session.scala#L131] > -- This message was sent by Atlassian JIRA (v7.6.3#76005)