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

Disallow default header to be overwritten #577

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

whynick1
Copy link
Contributor

@whynick1 whynick1 commented Apr 3, 2024

To resolve #550.

"rest",
uri=TEST_URI,
warehouse="s3://some-bucket",
**{"header.Content-Type": "application/vnd.api+json", "header.Customized-Header": "some/value"},
Copy link
Contributor Author

@whynick1 whynick1 Apr 3, 2024

Choose a reason for hiding this comment

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

Ensure custom header is still supported, meanwhile disallow default headers, such as Content-Type to be overwritten. Same for the test below.

@whynick1
Copy link
Contributor Author

whynick1 commented Apr 3, 2024

@flyrain @liurenjie1024 Can you take a look please. Thanks.

Copy link
Contributor

@flyrain flyrain left a comment

Choose a reason for hiding this comment

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

+1 Thanks @whynick1 for working on it.

@flyrain
Copy link
Contributor

flyrain commented Apr 3, 2024

@Fokko, do you wanna take a look?

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Thanks for pinging me @flyrain. This is a great approach. Thanks for the PR and adding the comprehensive tests @whynick1

@Fokko Fokko merged commit 90e5057 into apache:main Apr 3, 2024
7 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.

Custom header should not overwrite default header in RESTCatalog
3 participants