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
198 const off_t content_length = end_offset - start_offset; in WriteHeaders()
202 if (start_offset || start_offset == end_offset) { in WriteHeaders()
206 Itoa(start_offset == end_offset ? 0 : start_offset) + "-" + in WriteHeaders()
207 Itoa(end_offset - 1) + "/" + Itoa(end_offset) + EOL); in WriteHeaders()
227 const off_t end_offset, in WritePayload() argument
230 CHECK_LE(start_offset, end_offset); in WritePayload()
235 << end_offset; in WritePayload()
245 const size_t total_len = end_offset - start_offset; in WritePayload()
280 const off_t end_offset) { in WritePayload() argument
281 return WritePayload(fd, start_offset, end_offset, 'a', 10); in WritePayload()
317 size_t end_offset = in HandleGet() local
318 (request.end_offset > 0 ? request.end_offset : total_length); in HandleGet()
319 if (end_offset < start_offset) { in HandleGet()
320 LOG(WARNING) << "end offset (" << end_offset << ") precedes start offset (" in HandleGet()
324 if (end_offset > total_length) { in HandleGet()
325 LOG(INFO) << "requested end offset (" << end_offset in HandleGet()
327 end_offset = total_length; in HandleGet()
332 << (end_offset - 1) << "/" << (end_offset - start_offset) in HandleGet()
334 if ((ret = WriteHeaders(fd, start_offset, end_offset, request.return_code)) < in HandleGet()
341 size_t payload_length = end_offset - start_offset; in HandleGet()
346 end_offset = start_offset + payload_length; in HandleGet()
350 << (end_offset - 1) << "/" << (end_offset - start_offset); in HandleGet()
365 if ((ret = WritePayload(fd, midway_offset, end_offset)) < 0) in HandleGet()
370 if ((ret = WritePayload(fd, start_offset, end_offset)) < 0) in HandleGet()
438 size_t end_offset, in HandleErrorIfOffset() argument
463 return HandleGet(fd, request, end_offset); in HandleErrorIfOffset()