• Home
  • Raw
  • Download

Lines Matching refs:end_offset

79   off_t end_offset{0};  // non-inclusive, zero indicates unspecified.  member
129 request->end_offset = atoll(range.c_str() + range.find('-') + 1) + 1; in ParseRequest()
134 if (request->end_offset > 0) in ParseRequest()
136 (intmax_t)request->end_offset); in ParseRequest()
180 ssize_t WriteHeaders(int fd, const off_t start_offset, const off_t end_offset, in WriteHeaders() argument
194 const off_t content_length = end_offset - start_offset;; in WriteHeaders()
198 if (start_offset || start_offset == end_offset) { in WriteHeaders()
202 Itoa(start_offset == end_offset ? 0 : start_offset) + in WriteHeaders()
203 "-" + Itoa(end_offset - 1) + "/" + Itoa(end_offset) + in WriteHeaders()
222 size_t WritePayload(int fd, const off_t start_offset, const off_t end_offset, in WritePayload() argument
224 CHECK_LE(start_offset, end_offset); in WritePayload()
229 << end_offset; in WritePayload()
239 const size_t total_len = end_offset - start_offset; in WritePayload()
273 const off_t end_offset) { in WritePayload() argument
274 return WritePayload(fd, start_offset, end_offset, 'a', 10); in WritePayload()
308 size_t end_offset = (request.end_offset > 0 ? in HandleGet() local
309 request.end_offset : total_length); in HandleGet()
310 if (end_offset < start_offset) { in HandleGet()
311 LOG(WARNING) << "end offset (" << end_offset << ") precedes start offset (" in HandleGet()
315 if (end_offset > total_length) { in HandleGet()
316 LOG(INFO) << "requested end offset (" << end_offset in HandleGet()
318 end_offset = total_length; in HandleGet()
323 << (end_offset - 1) << "/" << (end_offset - start_offset) in HandleGet()
325 if ((ret = WriteHeaders(fd, start_offset, end_offset, in HandleGet()
332 size_t payload_length = end_offset - start_offset; in HandleGet()
337 end_offset = start_offset + payload_length; in HandleGet()
341 << (end_offset - 1) << "/" << (end_offset - start_offset); in HandleGet()
356 if ((ret = WritePayload(fd, midway_offset, end_offset)) < 0) in HandleGet()
361 if ((ret = WritePayload(fd, start_offset, end_offset)) < 0) in HandleGet()
427 size_t end_offset, int max_fails) { in HandleErrorIfOffset() argument
451 return HandleGet(fd, request, end_offset); in HandleErrorIfOffset()