Hello Tidy Bot, Zoltan Chovan, Alexey Serbin, Attila Bukor, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/20868
to look at the new patch set (#8).
Change subject: KUDU-3543 Fix Content-Type headers
......................................................................
KUDU-3543 Fix Content-Type headers
This patch addresses an issue with the webserver's Content-Type headers.
The problem lies in the webserver's handler functions, where we use a
boolean variable called 'is_styled' to decide on the style mode.
In the root Webserver::RunPathHandler function, only StyleMode::STYLED
or StyleMode::UNSTYLED are returned. Although SendResponse is invoked
with a use_style variable of type StyleMode, we only end up with
StyleMode::STYLED or StyleMode::UNSTYLED in the subsequent code paths.
Consequently, we never utilize StyleMode::BINARY. This means that the
master's /ipki-ca-cert-der endpoint does not have the expected
application/octet-stream content-type header; instead, it has text/plain.
(See KUDU-3543 for evidence).
This patch replaces the 'is_styled' boolean with the StyleMode enum
entirely. I have added test cases to verify the Content-Type headers of
the Master and TServer endpoints.
[1]
https://github.com/apache/kudu/blob/master/src/kudu/server/webserver.cc#L686-L687
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.cc
M src/kudu/util/test_util.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
17 files changed, 227 insertions(+), 83 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/68/20868/8
--
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: newpatchset
Gerrit-Change-Id: I746dcfbaadb2fb95292c2d4047cb7adb9971b42f
Gerrit-Change-Number: 20868
Gerrit-PatchSet: 8
Gerrit-Owner: Marton Greber <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Zoltan Chovan <[email protected]>