MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / callResourceHandler

Method callResourceHandler

internal/pluginhost/management.go:351–363  ·  view source on GitHub ↗
(ctx context.Context, record resourceRouteRecord, req pluginapi.ManagementRequest)

Source from the content-addressed store, hash-verified

349}
350
351func (h *Host) callResourceHandler(ctx context.Context, record resourceRouteRecord, req pluginapi.ManagementRequest) (resp pluginapi.ManagementResponse, err error) {
352 if h == nil || record.route.Handler == nil || h.isPluginFused(record.pluginID) || !h.pluginIdentityCurrent(record.pluginID, record.path, record.version) {
353 return pluginapi.ManagementResponse{}, nil
354 }
355 defer func() {
356 if recovered := recover(); recovered != nil {
357 h.fusePlugin(record.pluginID, "ResourceHandler.HandleManagement", recovered)
358 resp = pluginapi.ManagementResponse{}
359 err = fmt.Errorf("resource handler panic: %v", recovered)
360 }
361 }()
362 return record.route.Handler.HandleManagement(ctx, req)
363}

Callers 1

ServeResourceHTTPMethod · 0.95

Calls 4

isPluginFusedMethod · 0.95
pluginIdentityCurrentMethod · 0.95
fusePluginMethod · 0.95
HandleManagementMethod · 0.65

Tested by

no test coverage detected