diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 6df575621..22792ee8b 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -10,6 +10,7 @@ "errors" "fmt" "io" + "log" "net" "net/http" "os" @@ -292,6 +293,7 @@ func (b *LocalBackend) Prefs() *ipn.Prefs { // Status returns the latest status of the backend and its // sub-components. func (b *LocalBackend) Status() *ipnstate.Status { + log.Println("Status ENDPOINT") sb := new(ipnstate.StatusBuilder) b.UpdateStatus(sb) return sb.Status() diff --git a/tsweb/jsonhandler.go b/tsweb/jsonhandler.go index 9b3a0378b..e3154cd5e 100644 --- a/tsweb/jsonhandler.go +++ b/tsweb/jsonhandler.go @@ -89,3 +89,11 @@ func (fn JSONHandlerFunc) ServeHTTPReturn(w http.ResponseWriter, r *http.Request w.Write(b) return err } + +// TODO() Set this function such that chunk encoding works +func (fn JSONHandlerFunc) ServeHTTPChunkEncodingReturn(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("Connection", "Keep-Alive") + w.Header().Set("Transfer-Encoding", "chunked") + w.Header().Set("X-Content-Type-Options", "nosniff") + return nil +}