MCPcopy
hub / github.com/wavetermdev/waveterm / handleDynContent

Method handleDynContent

tsunami/engine/serverhandlers.go:439–454  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

437}
438
439func (h *httpHandlers) handleDynContent(w http.ResponseWriter, r *http.Request) {
440 defer func() {
441 panicErr := util.PanicHandler("handleDynContent", recover())
442 if panicErr != nil {
443 http.Error(w, fmt.Sprintf("internal server error: %v", panicErr), http.StatusInternalServerError)
444 }
445 }()
446
447 // Strip /assets prefix and update the request URL
448 r.URL.Path = strings.TrimPrefix(r.URL.Path, "/dyn")
449 if r.URL.Path == "" {
450 r.URL.Path = "/"
451 }
452
453 h.Client.UrlHandlerMux.ServeHTTP(w, r)
454}
455
456func (h *httpHandlers) handleSSE(w http.ResponseWriter, r *http.Request) {
457 defer func() {

Callers

nothing calls this directly

Calls 2

PanicHandlerFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected