• Home
  • Raw
  • Download

Lines Matching refs:start_offset

76   off_t start_offset{0};  member
128 request->start_offset = atoll(range.c_str() + strlen("bytes=")); in ParseRequest()
136 (intmax_t)request->start_offset); in ParseRequest()
184 const off_t start_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()
226 const off_t start_offset, in WritePayload() argument
230 CHECK_LE(start_offset, end_offset); in WritePayload()
234 << first_byte << "', offset range " << start_offset << " -> " in WritePayload()
245 const size_t total_len = end_offset - start_offset; in WritePayload()
251 size_t start_modulo = start_offset % line_len; in WritePayload()
279 const off_t start_offset, in WritePayload() argument
281 return WritePayload(fd, start_offset, end_offset, 'a', 10); in WritePayload()
305 const size_t start_offset = request.start_offset; in HandleGet() local
306 if (start_offset >= total_length) { in HandleGet()
307 LOG(WARNING) << "start offset (" << start_offset in HandleGet()
319 if (end_offset < start_offset) { in HandleGet()
321 << start_offset << "), generating error response"; in HandleGet()
331 LOG(INFO) << "generating response header: range=" << start_offset << "-" 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()
349 LOG(INFO) << "generating response payload: range=" << start_offset << "-" in HandleGet()
350 << (end_offset - 1) << "/" << (end_offset - start_offset); in HandleGet()
354 start_offset % (truncate_length * sleep_every) == 0) { in HandleGet()
355 const off_t midway_offset = start_offset + payload_length / 2; in HandleGet()
357 if ((ret = WritePayload(fd, start_offset, midway_offset)) < 0) in HandleGet()
370 if ((ret = WritePayload(fd, start_offset, end_offset)) < 0) in HandleGet()
442 if (request.start_offset > 0 && num_fails < max_fails) { in HandleErrorIfOffset()
482 const off_t start_offset = request.start_offset; in HandleDefault() local
487 if ((ret = WriteHeaders(fd, start_offset, size, request.return_code)) < 0) in HandleDefault()
491 (start_offset < static_cast<off_t>(size) ? data.substr(start_offset) in HandleDefault()