Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns the segment number of an object #309

Closed

Conversation

shinnya
Copy link
Contributor

@shinnya shinnya commented Apr 23, 2020

Types of changes

Please check one of the following:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New release (merge to both master and develop!)

Description of changes

Behavior

HEAD /v1/buckets/*/objects/* の結果に FrugalOS-Segment-Number ヘッダーを付与し、オブジェクトが存在すべきセグメント番号を返すようになる。

存在しないバケツを指定した場合は 400 を返す。

存在するバケツを指定した場合は 404 を返すが、FrugalOS-Segment-Number がヘッダーに付与される。

$ curl -I http://localhost:3100/v1/buckets/test/objects/hoge
HTTP/1.1 200 OK
Content-Type: application/octet-stream
FrugalOS-Segment-Number: 2
ETag: "1"
Content-Length: 0

$ curl -I http://localhost:3100/v1/buckets/test/objects/foo
HTTP/1.1 404 Not Found
Content-Type: application/json
FrugalOS-Segment-Number: 4
Transfer-Encoding: chunked

Purpose

This resolves #253.

Checklists

  • Run cargo fmt --all.
  • Run cargo clippy --all --all-targets.

@shinnya shinnya force-pushed the feature/response-segment-no branch from 14e67ef to f9f0608 Compare April 23, 2020 22:42
@shinnya shinnya marked this pull request as ready for review April 23, 2020 22:46
@shinnya shinnya added this to the v1.0.1 milestone Apr 23, 2020
@shinnya shinnya closed this May 14, 2020
@shinnya shinnya removed this from the v1.1.0 milestone Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

オブジェクト存在確認/取得時にセグメント番号も返す
1 participant