[
https://issues.apache.org/jira/browse/HDFS-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226929#comment-13226929
]
Uma Maheswara Rao G commented on HDFS-2025:
-------------------------------------------
Sravan, could you please regenreate the patch based on trunk? please generate
it from root.
Review comments on test part.
Below lines of code almost deplicate with the assertion part of 'Go Back to
File View'
{code}
Matcher matcher = compile.matcher(viewFilePage);
+ URL hyperlink = null;
+ if (matcher.find()) {
+ // got hyperlink for Tail this file
+ hyperlink = new URL(matcher.group(1));
+ viewFilePage = StringEscapeUtils.unescapeHtml(DFSTestUtil
+ .urlGet(hyperlink));
+ assertTrue("page should show preview of file contents", viewFilePage
+ .contains(FILE_DATA));
{code}
I would suggest, that extract it to separate methods and reuse.
> Go Back to File View link is not working in tail.jsp
> ----------------------------------------------------
>
> Key: HDFS-2025
> URL: https://issues.apache.org/jira/browse/HDFS-2025
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: data-node
> Affects Versions: 0.23.0
> Reporter: sravankorumilli
> Assignee: sravankorumilli
> Priority: Minor
> Attachments: HDFS-2025.patch, HDFS-2025_1.patch, HDFS-2025_2.patch,
> HDFS-2025_3.patch, HDFS-2025_4.patch, ScreenShot_1.jpg
>
>
> While browsing the file system.
> Click on any file link to go to the page where the file contents are
> displayed, then when we click on '*Tail this file*' link.
> The control will go to the tail.jsp here when we
> Click on '*Go Back to File View*' option.
> HTTP Error page not found will come.
> This is because the referrer URL is encoded and the encoded URL is itself
> being used in the '*Go Back to File View*' hyperlink which will be treated as
> a relative URL and thus the HTTP request will fail.
--
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