feat(services/onedrive): implement read_with_if_none_match#5763
Merged
Xuanwo merged 3 commits intoapache:mainfrom Mar 15, 2025
erickguan:onedrive-features
Merged
feat(services/onedrive): implement read_with_if_none_match#5763Xuanwo merged 3 commits intoapache:mainfrom erickguan:onedrive-features
Xuanwo merged 3 commits intoapache:mainfrom
erickguan:onedrive-features
Conversation
Member
Author
|
Behavior tests pass. OPENDAL_TEST=onedrive cargo test behavior --features tests,services-onedrive -- --show-output |
Xuanwo
reviewed
Mar 14, 2025
| let response = self.core.onedrive_get_content(path, args.range()).await?; | ||
| let response = self | ||
| .core | ||
| .onedrive_get_content(path, args.range(), args.if_none_match()) |
Member
There was a problem hiding this comment.
How about using OpRead directly?
| StatusCode::OK | StatusCode::PARTIAL_CONTENT => { | ||
| Ok((RpRead::default(), response.into_body())) | ||
| } | ||
| StatusCode::NOT_MODIFIED => { |
Member
There was a problem hiding this comment.
Maybe we can handle this in parse_error?
Member
This assumition is mostly true. |
Member
Author
|
Thanks! Then I will add documentation on the client to remember this. |
Member
Author
|
Updated: OPENDAL_TEST=onedrive cargo test behavior --features tests,services-onedrive -- --show-output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Part of #5486.
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?
I encountered an issue with the HTTP client when working with OneDrive. Specifically, OneDrive returns a 302 Location response when downloading an item. See
onedrive_get_content. This has two implications: