Lines Matching refs:Range
84 for _, d := range dirs {
100 // is that it handles Range requests properly, sets the MIME type, and
102 // and If-Range requests.
120 // ServeContent uses it to handle requests using If-Match, If-None-Match, or If-Range.
145 // all of the byte-range-spec values is greater than the content size.
146 var errNoOverlap = errors.New("invalid range: failed to overlap")
189 // handle Content-Range header.
196 w.Header().Set("Content-Range", fmt.Sprintf("bytes */%d", size))
205 // dumb client. Ignore the range request.
212 // range (for example, a response to a request for a
213 // single range, or to a request for a set of ranges
215 // transmitted with a Content-Range header, and a
219 // A response to a request for a single range MUST NOT
228 w.Header().Set("Content-Range", ra.contentRange(size))
239 for _, ra := range ranges {
421 ir := r.Header.get("If-Range")
433 // The If-Range value is typically the ETag value, but it may also be
504 rangeHeader = r.Header.get("Range")
654 for _, ent := range strings.FieldsFunc(v, isSlashRune) {
692 // httpRange specifies the byte range to be sent to the client.
703 "Content-Range": {r.contentRange(size)},
708 // parseRange parses a Range header string as per RFC 2616.
716 return nil, errors.New("invalid range")
720 for _, ra := range strings.Split(s[len(b):], ",") {
727 return nil, errors.New("invalid range")
733 // range start relative to the end of the file.
736 return nil, errors.New("invalid range")
746 return nil, errors.New("invalid range")
749 // If the range begins after the size of the content,
756 // If no end is specified, range extends to end of the file.
761 return nil, errors.New("invalid range")
791 for _, ra := range ranges {
801 for _, ra := range ranges {