Marton Greber has uploaded this change for review. ( http://gerrit.cloudera.org:8080/20868
Change subject: KUDU-3543 Fix Content-Type headers ...................................................................... KUDU-3543 Fix Content-Type headers Commit 1e7d1b3d117ca137bdce3d2ec549416d242bdd02 introduced a newly supported Content-Type: application/octet-stream. The problem is that in the webserver's path handler functions we only use a bool called 'is_styled' to decide on the style mode [1]. This patch basically replaced the 'is_styled' bool with the StyleMode enum entirely. Moreover, there were pages which should have been of Content-Type: application/json: /metrics, /rpcz, the /tracing/json/... pages. I took the liberty to add the JSON Content-Type and fix these as well. Finally, I added test cases to check the Content-Type headers of Master and TServer endpoints. [1] https://github.com/apache/kudu/blob/master/src/kudu/server/webserver.cc#L671-L672 Change-Id: I746dcfbaadb2fb95292c2d4047cb7adb9971b42f --- M src/kudu/master/master-test.cc M src/kudu/master/master_path_handlers.cc M src/kudu/server/default_path_handlers.cc M src/kudu/server/pprof_path_handlers.cc M src/kudu/server/rpcz-path-handler.cc M src/kudu/server/startup_path_handler.cc M src/kudu/server/tracing_path_handlers.cc M src/kudu/server/webserver.cc M src/kudu/server/webserver.h M src/kudu/tserver/tablet_server-test.cc M src/kudu/tserver/tserver_path_handlers.cc M src/kudu/util/jwt-util-test.cc M src/kudu/util/mini_oidc.cc M src/kudu/util/test_util.h M src/kudu/util/thread.cc M src/kudu/util/web_callback_registry.h 16 files changed, 254 insertions(+), 86 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/68/20868/1 -- To view, visit http://gerrit.cloudera.org:8080/20868 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I746dcfbaadb2fb95292c2d4047cb7adb9971b42f Gerrit-Change-Number: 20868 Gerrit-PatchSet: 1 Gerrit-Owner: Marton Greber <greber...@gmail.com>