Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/8141 )
Change subject: [webui] Allow custom response codes and headers ...................................................................... Patch Set 8: (3 comments) http://gerrit.cloudera.org:8080/#/c/8141/6/src/kudu/server/webserver.h File src/kudu/server/webserver.h: http://gerrit.cloudera.org:8080/#/c/8141/6/src/kudu/server/webserver.h@66 PS6, Line 66: // Register a route 'path' to be rendered via template. > Done What about 'alias'? http://gerrit.cloudera.org:8080/#/c/8141/8/src/kudu/server/webserver.cc File src/kudu/server/webserver.cc: http://gerrit.cloudera.org:8080/#/c/8141/8/src/kudu/server/webserver.cc@472 PS8, Line 472: std::set<string> invalid_headers{"Content-Type", "Content-Length", "X-Frame-Options"}; Can use unordered_set which is hash based and slightly faster on average. http://gerrit.cloudera.org:8080/#/c/8141/8/src/kudu/server/webserver.cc@475 PS8, Line 475: if (ContainsKey(invalid_headers, entry.first)) continue; Hmm, this seems too quiet: if a callback tries to send an invalid header, it'll just be silently ignored. I think it'd be better to crash, or to go in the other direction and allow callbacks to override those headers. -- 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: comment Gerrit-Change-Id: I9ff890785eeb2df3eed9e7c54d0daf760c8b3924 Gerrit-Change-Number: 8141 Gerrit-PatchSet: 8 Gerrit-Owner: Will Berkeley <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Reviewer: Will Berkeley <[email protected]> Gerrit-Comment-Date: Tue, 03 Oct 2017 23:50:11 +0000 Gerrit-HasComments: Yes
