From: Robert Obryk Date: Tue, 24 Jun 2014 00:38:17 +0000 (-0700) Subject: net/http: remove a duplicated check X-Git-Tag: go1.4beta1~1232 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=71c9a4948a38d0bd9430b42b50f8e5312c8bc9f0;p=gostls13.git 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 --- 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