[ 
https://issues.apache.org/jira/browse/HDFS-4944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13696060#comment-13696060
 ] 

Chris Nauroth commented on HDFS-4944:
-------------------------------------

I've attached patches for both branch-1 and trunk.  The branch-1 patch fixes 
the bug by switching to a different {{java.net.URI}} constructor that takes 
care of the URI encoding for us.  I've also added a unit test for creating a 
file that contains spaces.

The trunk patch just adds the unit test.  Trunk doesn't have the bug, but I'd 
like to keep the unit test there as a safeguard against regressions.

                
> WebHDFS cannot create a file path containing characters that must be 
> URI-encoded, such as space.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-4944
>                 URL: https://issues.apache.org/jira/browse/HDFS-4944
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 1.3.0
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HDFS-4944.1.patch, HDFS-4944-branch-1.1.patch
>
>
> On branch-1, WebHDFS cannot create a file containing spaces.  It fails with a 
> URI syntax error while trying to create a {{java.net.URI}} pointing to the 
> newly created file in the HTTP created response.  This bug does not impact 
> trunk, because the trunk code calls a different {{java.net.URI}} constructor, 
> which automatically takes care of the required URI encoding.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to