Home | History | Annotate | Download | only in http

Lines Matching refs:Range

38 	start, end int64 // range [start,end)
55 {r: "bytes=0-,1-,2-,3-,4-", code: StatusOK}, // ignore wasteful range request
99 // Range tests
101 for _, rt := range ServeFileRangeTests {
103 req.Header.Set("Range", rt.r)
105 resp, body := getBody(t, fmt.Sprintf("range test %q", rt.r), req)
107 t.Errorf("range=%q: StatusCode=%d, want %d", rt.r, resp.StatusCode, rt.code)
117 cr := resp.Header.Get("Content-Range")
119 t.Errorf("range=%q: Content-Range = %q, want %q", rt.r, cr, wantContentRange)
126 t.Errorf("range=%q: body = %q, want %q", rt.r, body, wantBody)
129 t.Errorf("range=%q content-type = %q; unexpected multipart/byteranges", rt.r, ct)
135 t.Errorf("range=%q content-type = %q; %v", rt.r, ct, err)
139 t.Errorf("range=%q content-type = %q; want multipart/byteranges", rt.r, typ)
143 t.Errorf("range=%q content-type = %q; lacks boundary", rt.r, ct)
147 t.Errorf("range=%q Content-Length = %d; want %d", rt.r, g, w)
151 for ri, rng := range rt.ranges {
154 t.Errorf("range=%q, reading part index %d: %v", rt.r, ri, err)
158 if g, w := part.Header.Get("Content-Range"), wantContentRange; g != w {
159 t.Errorf("range=%q: part Content-Range = %q; want %q", rt.r, g, w)
163 t.Errorf("range=%q, reading part index %d body: %v", rt.r, ri, err)
168 t.Errorf("range=%q: body = %q, want %q", rt.r, body, wantBody)
173 t.Errorf("range=%q; expected final error io.EOF; got %v", rt.r, err)
195 for _, tt := range tests {
222 for _, data := range fsRedirectTestData {
257 for n, test := range tests {
283 for i, test := range tests {
295 for i, test := range tests {
564 for _, path := range []string{"/testdata/", "/testdata/index.html"} {
835 "Range": "bytes=0-4",
845 "Range": "bytes=0-4",
846 "If-Range": `"A"`,
856 "Range": "bytes=0-4",
857 "If-Range": `W/"A"`,
866 "Range": "bytes=10-20",
872 // An If-Range resource for entity "A", but entity "B" is now current.
873 // The Range request should be ignored.
878 "Range": "bytes=0-4",
879 "If-Range": `"B"`,
888 "Range": "bytes=0-4",
889 "If-Range": "Wed, 25 Jun 2014 17:12:18 GMT",
900 "Range": "bytes=0-4",
901 "If-Range": "Wed, 25 Jun 2014 17:12:18 GMT",
971 for testName, tt := range tests {
995 for k, v := range tt.reqHeader {
1010 if g, e := res.Header.Get("Content-Range"), tt.wantContentRange; g != e {
1011 t.Errorf("test %q: content-range = %q, want %q", testName, g, e)
1053 for _, code := range []int{403, 404, 500} {
1174 for _, tt := range tests {
1218 for _, test := range tests {