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

Stop providing getcontenttype WebDAV property for Zarr entries #250

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Feb 13, 2025

Currently, PROPFIND responses from dandidav declare all Zarr entries to have Content-Types of "application/octet-stream". However, now that dandi-cli is going to be setting the Content-Type for certain Zarr entries to "application/json", this will start being incorrect. S3's list_objects_v2 endpoint doesn't return object Content-Types, so we can't efficiently find out what files dandi-cli has declared as JSON, so the next best option is just stop providing the Content-Type for all Zarr entries.

Note that this only affects metadata returned using the WebDAV protocol, which I don't think anyone is using anyway.

Currently, PROPFIND responses from `dandidav` declare all Zarr entries to have
Content-Types of "application/octet-stream".  However, now that dandi-cli is
going to be setting the Content-Type for certain Zarr entries to
"application/json", this will start being incorrect.  S3's `list_objects_v2`
endpoint doesn't return object Content-Types, so we can't efficiently find out
what files dandi-cli has declared as JSON, so the next best option is just stop
providing the Content-Type for all Zarr entries.

Note that this only affects metadata returned using the WebDAV protocol, which
I don't think anyone is using anyway.
@jwodder jwodder added correctness Getting it right WebDAV Specific to the WebDAV protocol/implementation labels Feb 13, 2025
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.52%. Comparing base (ccc7407) to head (af18631).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/dav/types.rs 60.00% 2 Missing ⚠️
src/dav/mod.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
- Coverage   79.53%   79.52%   -0.02%     
==========================================
  Files          34       34              
  Lines        6588     6589       +1     
==========================================
  Hits         5240     5240              
- Misses       1348     1349       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jwodder jwodder merged commit 0963b14 into main Feb 13, 2025
9 of 11 checks passed
@jwodder jwodder deleted the no-entry-mime branch February 13, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
correctness Getting it right WebDAV Specific to the WebDAV protocol/implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant