Skip to content

Commit 0032c59

Browse files
authored
feat: add content-length header (#127)
1 parent 2216d2b commit 0032c59

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

server/api/api.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package api
33
import (
44
"fmt"
55
"net/http"
6+
"strconv"
67

78
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
89
"github.com/newrelic/go-agent/v3/newrelic"
@@ -54,6 +55,7 @@ func handleSchemaResponse(mux *runtime.ServeMux, getSchemaFn getSchemaData) runt
5455
contentType = "application/octet-stream"
5556
}
5657
w.Header().Set("Content-Type", contentType)
58+
w.Header().Set("Content-Length", strconv.Itoa(len(data)))
5759
w.WriteHeader(http.StatusOK)
5860
w.Write(data)
5961
}

0 commit comments

Comments
 (0)