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

Fix director default response and add HEAD as allowed verb #1000

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

jhiemstrawisc
Copy link
Member

Short and sweet, this should allow us to issue HEAD requests against the API the /api/v1.0/director/<origin or object> endpoints. The tagged issue also mentioned making this compatible with our shortcut middleware in the director, but it looks like it already was -- the middleware was agnostic of verbs that weren't PUT. My addition to the middleware here explicitly ties GET/HEAD requests to the appropriate redirect functions so that other verbs we don't anticipate don't creep in.

One thing to note is that if a client who issues a HEAD for some resource chooses to follow the redirect, XRootD appears to hang with an open connection. Since that's in XRootD land, I'm considering it outside the scope of this small fix.

Closes #754

@jhiemstrawisc jhiemstrawisc requested a review from haoming29 March 27, 2024 16:23
@haoming29
Copy link
Contributor

@jhiemstrawisc Congrats on opening the #1000 PR! ⭐

Copy link
Contributor

@haoming29 haoming29 left a comment

Choose a reason for hiding this comment

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

One question about viper.Set but otherwise looks good to me!

launchers/launcher.go Outdated Show resolved Hide resolved
@jhiemstrawisc jhiemstrawisc requested a review from haoming29 March 27, 2024 18:45
Copy link
Contributor

@haoming29 haoming29 left a comment

Choose a reason for hiding this comment

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

LGTM!

@haoming29 haoming29 merged commit 75eacef into PelicanPlatform:main Mar 27, 2024
19 checks passed
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.

HEAD doesn't work in director against the origins endpoint
2 participants