Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AB1D18B48 for ; Mon, 29 Jun 2015 11:05:05 +0000 (UTC) Received: (qmail 28893 invoked by uid 500); 29 Jun 2015 11:05:04 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 28829 invoked by uid 500); 29 Jun 2015 11:05:04 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 28816 invoked by uid 99); 29 Jun 2015 11:05:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jun 2015 11:05:04 +0000 Date: Mon, 29 Jun 2015 11:05:04 +0000 (UTC) From: "kanaka kumar avvaru (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (HDFS-3272) Make it possible to state MIME type for a webhdfs OPEN operation's result MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-3272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] kanaka kumar avvaru reassigned HDFS-3272: ----------------------------------------- Assignee: kanaka kumar avvaru > 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 > Components: webhdfs > Affects Versions: 1.0.1, 2.0.2-alpha > Reporter: Steve Loughran > Assignee: kanaka kumar avvaru > Priority: Minor > Labels: BB2015-05-TBR > Attachments: HDFS-3272.patch > > > 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 was sent by Atlassian JIRA (v6.3.4#6332)