From 71c9a4948a38d0bd9430b42b50f8e5312c8bc9f0 Mon Sep 17 00:00:00 2001 From: Robert Obryk Date: Mon, 23 Jun 2014 17:38:17 -0700 Subject: [PATCH] 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 --- src/pkg/net/http/fs.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/pkg/net/http/fs.go b/src/pkg/net/http/fs.go index 8576cf844a..2c7ec53800 100644 --- a/src/pkg/net/http/fs.go +++ b/src/pkg/net/http/fs.go @@ -212,12 +212,6 @@ func serveContent(w ResponseWriter, r *Request, name string, modtime time.Time, code = StatusPartialContent w.Header().Set("Content-Range", ra.contentRange(size)) case len(ranges) > 1: - for _, ra := range ranges { - if ra.start > size { - Error(w, err.Error(), StatusRequestedRangeNotSatisfiable) - return - } - } sendSize = rangesMIMESize(ranges, ctype, size) code = StatusPartialContent -- 2.48.1