You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/06/06 10:06:00 UTC
[jira] [Commented] (HDFS-17040) WebHDFS UI should set content type to application/octet-stream when uploading a file
[ https://issues.apache.org/jira/browse/HDFS-17040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17729679#comment-17729679 ]
ASF GitHub Bot commented on HDFS-17040:
---------------------------------------
zeroflag opened a new pull request, #5721:
URL: https://github.com/apache/hadoop/pull/5721
### Description of PR
When uploading a file WebHDFS will set the content type to application/x-www-form-urlencoded, as this is the default used by jQuery
This causes knox to urlencode the request body so that uploading a CVS file 1,2,3 will result 1%2C2%2C3.
Instead of application/x-www-form-urlencoded I think the encoding should be set to application/octet-stream.
### How was this patch tested?
Tested manually using webhdfs UI
### For code changes:
content type is explicitly set to octet stream
> WebHDFS UI should set content type to application/octet-stream when uploading a file
> ------------------------------------------------------------------------------------
>
> Key: HDFS-17040
> URL: https://issues.apache.org/jira/browse/HDFS-17040
> Project: Hadoop HDFS
> Issue Type: Task
> Reporter: Attila Magyar
> Priority: Major
>
> When uploading a file WebHDFS will set the content type to application/x-www-form-urlencoded, as this is the default used by jQuery
> https://github.com/apache/hadoop/blob/160b9fc3c9255024c00d487b7fcdf5ea59a42781/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js#L516
> This causes knox to urlencode the request body so that uploading a CVS file 1,2,3 will result 1%2C2%2C3.
> Instead of application/x-www-form-urlencoded I think the encoding should be set to application/octet-stream.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org