Fix superflous header issue
This commit is contained in:
@@ -195,9 +195,11 @@ func (f *File) streamWithRetry(w http.ResponseWriter, r *http.Request, retryCoun
|
||||
return retryErr
|
||||
}
|
||||
|
||||
if err := f.streamBuffer(w, resp.Body); err != nil {
|
||||
return err
|
||||
}
|
||||
setVideoResponseHeaders(w, resp, isRangeRequest == 1)
|
||||
|
||||
return f.streamBuffer(w, resp.Body)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *File) streamBuffer(w http.ResponseWriter, src io.Reader) error {
|
||||
|
||||
@@ -484,7 +484,7 @@ func (h *Handler) handleGet(w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
// Generic error
|
||||
if !hasHeadersWritten(w) {
|
||||
http.Error(w, "Stream error", http.StatusInternalServerError)
|
||||
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
|
||||
return
|
||||
} else {
|
||||
h.logger.Error().
|
||||
|
||||
Reference in New Issue
Block a user