support range requests

Đang mở
#745 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu bằng cách truy vết cách các client được sinh ra xây dựng request và xử lý response nhị phân, sau đó xác định nơi các HTTP header và status code được cung cấp. Xác định tiêu chí hoàn thành xoay quanh việc gửi Range, chấp nhận 200 hoặc 206, báo cáo 416 một cách có ý nghĩa, và cung cấp Content-Range cùng Accept-Ranges cho các response GET hoặc HEAD.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

It does not currently seem possible to be able to make a HTTP range request for an endpoint that returns a binary asset (i.e., not a JSON-formatted response). I believe we would need the following things:

  • some way to add a Range header with a value like bytes=1000-4999 (representing a request for 4000 bytes starting at offset 1000) on a request as part of building it
  • to accept either a HTTP 200 OK or a HTTP 206 Partial Content response in the case of a range request
  • to provide a useful error in the case that we get a HTTP 416 Range Not Satisfiable response
  • to expose the value of the Content-Range header in the response to the consumer so that we can confirm that the server understood our range request
  • to expose the value of the Aceept-Ranges header from the response to a GET or (especially) HEAD request, so that a client can determine if the server is reporting range request support

I couldn't immediately find a way for an OpenAPI definition document to report support for range requests, so it would be up to the consumer and the server to correctly negotiate them using the regular pattern of headers and HEAD requests.

Ngôn ngữ chính
Rust
Star
1k
Fork
142
Merge trung bình
19 giờ 13 phút
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của oxidecomputer/progenitor

Tất cả issue của oxidecomputer/progenitor

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.