Lines Matching refs:end_offset
77 off_t end_offset{0}; // non-inclusive, zero indicates unspecified. member
131 request->end_offset = atoll(range.c_str() + range.find('-') + 1) + 1; in ParseRequest()
137 if (request->end_offset > 0) in ParseRequest()
139 &tmp_str, "%jd (non-inclusive)", (intmax_t)request->end_offset); in ParseRequest()
185 const off_t end_offset, in WriteHeaders() argument
199 const off_t content_length = end_offset - start_offset; in WriteHeaders()
203 if (start_offset || start_offset == end_offset) { in WriteHeaders()
207 Itoa(start_offset == end_offset ? 0 : start_offset) + "-" + in WriteHeaders()
208 Itoa(end_offset - 1) + "/" + Itoa(end_offset) + EOL); in WriteHeaders()
228 const off_t end_offset, in WritePayload() argument
231 CHECK_LE(start_offset, end_offset); in WritePayload()
236 << end_offset; in WritePayload()
246 const size_t total_len = end_offset - start_offset; in WritePayload()
281 const off_t end_offset) { in WritePayload() argument
282 return WritePayload(fd, start_offset, end_offset, 'a', 10); in WritePayload()
318 size_t end_offset = in HandleGet() local
319 (request.end_offset > 0 ? request.end_offset : total_length); in HandleGet()
320 if (end_offset < start_offset) { in HandleGet()
321 LOG(WARNING) << "end offset (" << end_offset << ") precedes start offset (" in HandleGet()
325 if (end_offset > total_length) { in HandleGet()
326 LOG(INFO) << "requested end offset (" << end_offset in HandleGet()
328 end_offset = total_length; in HandleGet()
333 << (end_offset - 1) << "/" << (end_offset - start_offset) in HandleGet()
335 if ((ret = WriteHeaders(fd, start_offset, end_offset, request.return_code)) < in HandleGet()
342 size_t payload_length = end_offset - start_offset; in HandleGet()
347 end_offset = start_offset + payload_length; in HandleGet()
351 << (end_offset - 1) << "/" << (end_offset - start_offset); in HandleGet()
366 if ((ret = WritePayload(fd, midway_offset, end_offset)) < 0) in HandleGet()
371 if ((ret = WritePayload(fd, start_offset, end_offset)) < 0) in HandleGet()
440 size_t end_offset, in HandleErrorIfOffset() argument
465 return HandleGet(fd, request, end_offset); in HandleErrorIfOffset()