Mime type

This commit is contained in:
Tom Wilkie
2015-09-18 03:50:06 +00:00
committed by Tom Wilkie
parent 7dff1bd85e
commit 9f49f63fc6
2 changed files with 6 additions and 4 deletions

View File

@@ -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)

View File

@@ -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: