mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Mime type
This commit is contained in:
@@ -4,11 +4,12 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"mime"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
dockerClient "github.com/fsouza/go-dockerclient"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"github.com/weaveworks/scope/probe/docker"
|
||||
"github.com/weaveworks/scope/probe/process"
|
||||
@@ -110,12 +111,12 @@ func (t *tracer) http(port int) {
|
||||
w.WriteHeader(204)
|
||||
})
|
||||
|
||||
|
||||
|
||||
router.Methods("GET").Path("/traces").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
respondWith(w, http.StatusOK, t.store.Traces())
|
||||
})
|
||||
|
||||
mime.AddExtensionType(".svg", "image/svg+xml")
|
||||
|
||||
router.Methods("GET").PathPrefix("/").Handler(http.FileServer(FS(false))) // everything else is static
|
||||
|
||||
log.Printf("Launching HTTP API on port %d", port)
|
||||
|
||||
@@ -16,6 +16,7 @@ const (
|
||||
STAT = 4
|
||||
MMAP = 9
|
||||
MPROTECT = 10
|
||||
SELECT = 23
|
||||
MADVISE = 28
|
||||
SOCKET = 41
|
||||
CONNECT = 42
|
||||
@@ -97,7 +98,7 @@ func (t *thread) syscallStopped() {
|
||||
t.handleIO(&t.callRegs, &t.resultRegs)
|
||||
|
||||
// we can ignore these syscalls
|
||||
case SETROBUSTLIST, GETID, MMAP, MPROTECT, MADVISE, SOCKET, CLONE, STAT:
|
||||
case SETROBUSTLIST, GETID, MMAP, MPROTECT, MADVISE, SOCKET, CLONE, STAT, SELECT:
|
||||
return
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user