MCPcopy Create free account
hub / github.com/apache/mesos / debug

Method debug

src/files/files.cpp:809–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807
808
809Future<http::Response> FilesProcess::debug(
810 const http::Request& request,
811 const Option<Principal>& principal)
812{
813 JSON::Object object;
814 foreachpair (const string& virtualPath, const string& path, paths) {
815 object.values[virtualPath] = path;
816 }
817
818 const Option<string>& jsonp = request.url.query.get("jsonp");
819
820 return authorizeEndpoint(
821 request.url.path,
822 request.method,
823 authorizer,
824 principal)
825 .then(defer(
826 [object, jsonp](bool authorized) -> Future<http::Response> {
827 if (!authorized) {
828 return Forbidden();
829 }
830
831 return OK(object, jsonp);
832 }));
833}
834
835
836Result<string> FilesProcess::resolve(const string& path)

Callers

nothing calls this directly

Calls 6

authorizeEndpointFunction · 0.85
deferFunction · 0.85
ForbiddenClass · 0.85
OKClass · 0.85
getMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected