Make it possible to state MIME type for a webhdfs OPEN operation's result -------------------------------------------------------------------------
Key: HDFS-3272 URL: https://issues.apache.org/jira/browse/HDFS-3272 Project: Hadoop HDFS Issue Type: Improvement Affects Versions: 1.0.1 Reporter: Steve Loughran Priority: Minor when you do a GET from the browser with webhdfs, you get the file, but it comes over as a binary as the browser doesn't know what type it is. Having a mime mapping table and such like would be one solution, but another is simply to add a {{mime}} query parameter that would provide a string to be reflected back to the caller as the Content-Type header in the HTTP response. e.g. {code} http://ranier:50070/webhdfs/v1/results/Debounce/part-r-00000.csv?op=open&mime=text/csv {code} would generate a 307 redirect to the datanode, with the {code} http://dn1:50075/webhdfs/v1/results/Debounce/part-r-00000.csv?op=open&mime=text/csv {code} which would then generate the result {code} 200 OK Content-Type:text/csv GATE4,eb8bd736445f415e18886ba037f84829,55000,2007-01-14,14:01:54, GATE4,ec58edcce1049fa665446dc1fa690638,8030803000,2007-01-14,13:52:31, ... {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira