mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
This commit is contained in:
1 parent
d717b704d8
commit
7ddb67ea41
3 files changed
+27
-8
No files matched your search
@@ -210,6 +210,7 @@ func (h *Host) resource(r *http.Request) (*guigo.Resource, error) {
|
||||
contentType = http.DetectContentType(header)
|
||||
}
|
||||
headers := http.Header{"Content-Type": {contentType}, "Content-Length": {strconv.FormatInt(size, 10)}, "Cache-Control": {"no-store"}, "Accept-Ranges": {"bytes"}}
|
||||
headers.Set("X-OFDGo-Build-Version", build.Version)
|
||||
start, length, status := int64(0), size, http.StatusOK
|
||||
if value := r.Header.Get("Range"); value != "" && r.Method == http.MethodGet {
|
||||
if !strings.HasPrefix(value, "bytes=") || strings.Contains(value, ",") {
|
||||
|
||||
Reference in new issue
Block a user