attach content length as well
This commit is contained in:
parent
403549ed26
commit
506272e290
2
pages.go
2
pages.go
|
@ -5,6 +5,7 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
_ "embed"
|
||||
)
|
||||
|
@ -27,6 +28,7 @@ func SendIndex(wr http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
resp.Header = http.Header{}
|
||||
resp.Header.Add("Content-Type", "text/html")
|
||||
resp.Header.Add("Content-Length", strconv.Itoa(len(index)))
|
||||
resp.Header.Add("Server", "astra")
|
||||
req.Response = &resp
|
||||
copyHeader(wr.Header(), resp.Header)
|
||||
|
|
Loading…
Reference in New Issue