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

Enable HEAD request instead of ony GET #269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wachsylon
Copy link

Some ZARR-applications use HEAD requests instead of GET requests. Found out that FASTAPI returns "Method not allowed" for HEAD requests where only GET requests are defined. This would enable it by returning the same as the GETs.

@mpiannucci mpiannucci requested a review from abkfenris May 23, 2024 13:32
Copy link
Member

@abkfenris abkfenris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wachsylon this looks good to me, let me know when you are happy with it and pre-commit is happy. Codecov seems to be a little nutty at the moment, so we can ignore it.

@jhamman
Copy link
Contributor

jhamman commented May 23, 2024

@wachsylon, can you give some examples of what zarr apps need to be making HEAD requests? I'm struggling to see how this aligns with the classic call patterns against HTTP Zarr stores.

@wachsylon
Copy link
Author

wachsylon commented May 24, 2024

i was a bit unspecific: I think that this specific app first tries to find out whether there really is sth to GET before it actually gets it.

use HEAD requests instead of GET requests

so rather "in addition" than "instead of GET".

can you give some examples of what zarr apps need to be making HEAD requests?

I needed it for a zarr-js app.

I'm struggling to see how this aligns with the classic call patterns against HTTP Zarr stores.

I thought that we just do not want xpublish to return "method not allowed" for HEADs anyway, no matter what the standard actually is.

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.

3 participants