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

Use case-insensitive search for ETag header #66

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

bbockelm
Copy link
Collaborator

The code still needs to be replaced with proper header parsing. However, for now, we settle for switching to case-insensitive parsing and adding checks for return codes.

@bbockelm bbockelm requested a review from rw2 December 14, 2024 20:58
@bbockelm bbockelm force-pushed the etag_case_insensitive branch 2 times, most recently from d913fe7 to f99ffb1 Compare December 15, 2024 21:27
Refactors the ETag parsing to be done within the request command itself
instead of in the filesystem layer.

The code still needs to be replaced with proper header parsing.
However, for now, we settle for switching to case-insensitive parsing
and adding checks for return codes.
@bbockelm bbockelm force-pushed the etag_case_insensitive branch from f99ffb1 to 74da355 Compare December 15, 2024 21:29
@bbockelm bbockelm linked an issue Dec 16, 2024 that may be closed by this pull request
@bbockelm
Copy link
Collaborator Author

@rw2 - apologies, it appears I forgot to link this PR to the original issue so you may have missed the notification I posted it over the weekend.

Even if you ended up going a different route for the fix itself in the meantime, I think there's value in the second commit (which provides unit test coverage for lower-case headers).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we have an internal string library, I'd be happier if the case insensitive string compare was pulled out of here and put into the library.

@jhiemstrawisc jhiemstrawisc self-requested a review December 17, 2024 17:24
Copy link
Member

@jhiemstrawisc jhiemstrawisc left a comment

Choose a reason for hiding this comment

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

LGTM.

@jhiemstrawisc jhiemstrawisc merged commit 91b7196 into PelicanPlatform:main Dec 17, 2024
3 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.

ETag not properly parsed from headers
3 participants