PDavid commented on code in PR #7568:
URL: https://github.com/apache/hbase/pull/7568#discussion_r2661057680
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/http/TestRSStatusPage.java:
##########
@@ -122,7 +122,7 @@ public void testStatusPage() throws Exception {
int port = firstServerName.getPort();
URL url = new URL("http://" + hostname + ":" + infoPort +
"/regionserver.jsp");
- String page = TestServerHttpUtils.getPageContent(url,
"text/html;charset=utf-8");
+ String page = TestServerHttpUtils.getPageContent(url, "text/html");
Review Comment:
Many thanks for you all for looking into this. :+1:
I think I found the problem. In regionserver.jsp, on line 42 we manually set
the content type to "text/html" when not a JSON format parameter was requested:
https://github.com/apache/hbase/blob/branch-2/hbase-server/src/main/resources/hbase-webapps/regionserver/regionserver.jsp#L42
So the fix would be to have:
```jsp
if (RSStatusConstants.FORMAT_JSON.equals(format)) {
response.setContentType("application/json");
} else {
response.setContentType("text/html;charset=UTF-8");
}
```
I'm not exactly sure why this test did not fail on master and branch-3, I'll
have to investigate that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]