Skip to content

Commit 71c9a49

Browse files
robrykbradfitz
authored andcommitted
net/http: remove a duplicated check
The previous call to parseRange already checks whether all the ranges start before the end of file. LGTM=robert.hencke, bradfitz R=golang-codereviews, robert.hencke, gobot, bradfitz CC=golang-codereviews https://golang.org/cl/91880044
1 parent fbd5ad5 commit 71c9a49

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/pkg/net/http/fs.go

-6
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,6 @@ func serveContent(w ResponseWriter, r *Request, name string, modtime time.Time,
212212
code = StatusPartialContent
213213
w.Header().Set("Content-Range", ra.contentRange(size))
214214
case len(ranges) > 1:
215-
for _, ra := range ranges {
216-
if ra.start > size {
217-
Error(w, err.Error(), StatusRequestedRangeNotSatisfiable)
218-
return
219-
}
220-
}
221215
sendSize = rangesMIMESize(ranges, ctype, size)
222216
code = StatusPartialContent
223217

0 commit comments

Comments
 (0)