JBoss Community

"Content-Type" Response on file upload

created by Christos Vasilakis in JBoss AS 7 Development - View the full discussion

Hi there,

 

I am playing around with the http management interface from the command line. I noticed that after doing a file upload although the response is json encoded, the header "Content-Type" is set to "text/html". This causes a problem on the http library I am using to parse the respone.

 

$ curl -F "file=@./JNDIDumper.war;filename=JNDIDumper.war" --digest -D - http://username:password@localhost:9990/management/add-content
HTTP/1.1 401 Unauthorized
Content-length: 0
Www-authenticate: Digest realm="ManagementRealm",nonce="7796c86a5a58342783976482ce53b1df"
Date: Tue, 06 Mar 2012 09:19:39 GMT

HTTP/1.1 100 Continue
Content-Length: 0

HTTP/1.1 200 OK
Transfer-encoding: chunked
Content-type: text/html
Date: Tue, 06 Mar 2012 09:19:39 GMT

{"outcome" : "success", "result" : { "BYTES_VALUE" : "INxgd71RD4ENf0mVe3/n9gqhqPQ=" }}

 

Let me know if you want me to open a JIRA

 

Regards,

Christos

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community