Will Berkeley has uploaded this change for review. ( http://gerrit.cloudera.org:8080/8141
Change subject: [webui] Allow custom response codes and headers ...................................................................... [webui] Allow custom response codes and headers Previously, the path handlers used to implement pages in the web ui could only return 200 OK and could not set any headers, as these two aspects of the HTTP response were handled in the underlying webserver code. This patch introduces WebResponse and PrerenderedWebResponse structs that wrap and replace the 'output' EasyJson and ostringstream pointers, respectively, used before, and which has fields for the response code and additional headers. The ability to add headers isn't currently used, but it's nice to have. The response codes are adjusted where necessary to match what one would expect, e.g. navigating to /tablet?id=foo returns 404. Change-Id: I9ff890785eeb2df3eed9e7c54d0daf760c8b3924 --- M src/kudu/master/master-path-handlers.cc M src/kudu/master/master-path-handlers.h 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/tracing-path-handlers.cc M src/kudu/server/webserver.cc M src/kudu/server/webserver.h M src/kudu/tserver/tserver-path-handlers.cc M src/kudu/tserver/tserver-path-handlers.h M src/kudu/util/thread.cc M src/kudu/util/web_callback_registry.h 12 files changed, 226 insertions(+), 109 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/41/8141/1 -- To view, visit http://gerrit.cloudera.org:8080/8141 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I9ff890785eeb2df3eed9e7c54d0daf760c8b3924 Gerrit-Change-Number: 8141 Gerrit-PatchSet: 1 Gerrit-Owner: Will Berkeley <wdberke...@gmail.com>